HP NonStop SeeView Manual Abstract The HP NonStop™ SeeView product is a script-execution environment and virtual interface to an extensible windowing system for interactive programs. SeeView provides a command interpreter shell facility for any interactive text program that executes on HP NonStop servers. SeeView also includes server-mode scripting capabilities that allow Web clients to access command interpreters.
Document History Part Number Product Version Published 135082 SeeView 31MAR97 January 1998 526355-001 SeeView 11AUG2003 September 2003 526355-002 SeeView 28NOV2003 April 2004 526355-003 SeeView 01OCT2004 or later April 2005 526355-004 SeeView 01OCT2004 or later June 2005
HP NonStop SeeView Manual Index Examples What’s New in This Manual xiii Manual Information xiii New and Changed Information Figures Tables xiii About This Manual xv Audience xv Related Manuals xv Manual Organization xvi Notation Conventions xvi 1.
1. Introduction (continued) Contents 1. Introduction (continued) SeeView Help 1-8 Help on SeeView Statements 1-9 Help on SeeShell Menus and Menu Items 1-9 2.
3. Using the SeeView Program (continued) Contents 3. Using the SeeView Program (continued) Message Caches 3-10 Return Key 3-11 Break Key 3-12 Configured Timeouts 3-12 Control Characters 3-13 Function Key Summary 3-13 4. Seedit Utility Editing Text Files 4-2 Loading a File 4-2 Saving a File 4-3 Seedit Commands 4-3 CONNECT 4-3 FILES 4-4 GET 4-5 HELP 4-6 INFO 4-6 MONITOR 4-7 MSG 4-8 OBEY 4-9 PURGE 4-9 RUN 4-9 SEND 4-10 SET 4-11 SUBVOLS 4-12 SYSTEM 4-12 USERS 4-13 VOLUME 4-13 5.
5. SeeView Language Elements (continued) Contents 5.
6. SeeView Programming (continued) Contents 6. SeeView Programming (continued) Establish Menu and Window Contents 6-4 Follow Conventions for Placing Menus and Windows Follow Human Interface Standards 6-5 Identify Which Types of Menus to Use 6-6 Develop the Script 6-7 Develop Top-Down 6-7 Use Relative Menu Locations 6-7 Use the Same Cache for Each Menu 6-8 Use Default Productions 6-8 Write Your Procedures 6-9 Comment As You Code 6-9 Test As You Code 6-10 Write User Documentation 6-10 6-5 7.
9. SeeView Statements and Script Symbols (continued) Contents 9.
. SeeView Statements and Script Symbols (continued) Contents 9.
A. Running the SeeView Program Contents A. Running the SeeView Program Installation A-1 How to Run the SeeView Program A-1 Startup Values A-2 PARAMs in Startup Message A-4 Startup Modes A-4 SeeShell Mode A-4 Standard In-File Mode A-4 Environment Switch Mode A-5 Interactive Mode A-5 B.
B. SeeView Function Key Reference (continued) Contents B. SeeView Function Key Reference (continued) SF12 B-8 F13 B-8 SF13 B-8 F14 B-9 SF14 B-9 F15 B-9 SF15 B-9 F16 B-9 SF16 B-10 PrevPage B-10 Shift-PrevPage B-10 NextPage B-10 Shift-NextPage B-10 RollDown B-10 Shift-RollDown B-10 RollUp B-10 Shift-RollUp B-10 InsertLine B-10 DeleteLine B-11 C. Sample Script D. PCT.INI Recommendations E. ASCII Character Set Index Examples Example 5-1. Example 5-2. Example 5-3. Example 5-4. Example 5-5. Example 5-6.
Examples (continued) Contents Examples (continued) Example 5-9. Example 5-10. Example 5-11. Example 5-12. Example 5-13. Example 5-14. Example 5-15. Example 5-16. Example 5-17. Example 5-18. Example 5-19. Example 7-1. Example 8-1. Example 8-2. Example 9-1.
Figures (continued) Contents Figures (continued) Figure 5-17. Figure 7-1. SeeView Output From the Program in Example 5-16 5-37 Example of Edit-Mode Language Interface on the Help Page 7-3 Tables Table 2-1. Table 2-2. Table 2-3. Table 3-1. Table 4-1. Table 4-2. Table 9-1. Table 9-2. Table 9-3. Table B-1. Table B-2.
Tables Contents HP NonStop SeeView Manual—526355-004 xii
What’s New in This Manual Manual Information HP NonStop SeeView Manual Abstract The HP NonStop™ SeeView product is a script-execution environment and virtual interface to an extensible windowing system for interactive programs. SeeView provides a command interpreter shell facility for any interactive text program that executes on HP NonStop servers. SeeView also includes server-mode scripting capabilities that allow Web clients to access command interpreters.
New and Changed Information What’s New in This Manual • • • • • • A new #TASKPROC intrinsic returns the name of the Guardian procedure that was used to create a process in the most recently executed TASK, OPEN, or RUN statement. Values returned are NEWPROCESS or PROCESS_CREATE_. This statement allows scripts to determine how #TASKERROR and #TASKERRORTYPE errors should be analyzed. The errors returned by NEWPROCESS and PROCESS_CREATE_ are documented in the Guardian Procedure Calls Reference Manual.
About This Manual This manual describes the SeeView product, a command interpreter shell facility for interactive text interface programs using the HP NonStop operating system. Section 1, Introduction, through Section 4, Seedit Utility, describe how to use the SeeView standard shell called SeeShell. Section 5, SeeView Language Elements, through Section 9, SeeView Statements and Script Symbols, describes how to create programs with the SeeView product.
Manual Organization About This Manual Manual Organization This manual has the following sections and appendices: Section Contents Section 1, Introduction Describes the SeeView product and its components Section 2, Using SeeShell Menus Explains how to use the standard SeeShell menus Section 3, Using the SeeView Program Tells how to run the SeeView program Section 4, Seedit Utility Describes the SeeView text editing and file handling utility, Seedit Section 5, SeeView Language Elements Explains h
General Syntax Notation About This Manual General Syntax Notation This list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS. Uppercase letters indicate keywords and reserved words. Type these items exactly as shown. Items not enclosed in brackets are required. For example: MAXATTACH lowercase italic letters. Lowercase italic letters indicate variable items that you supply. Items not enclosed in brackets are required. For example: file-name computer type.
General Syntax Notation About This Manual | Vertical Line. A vertical line separates alternatives in a horizontal list that is enclosed in brackets or braces. For example: INSPECT { OFF | ON | SAVEABEND } … Ellipsis. An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times.
Notation for Messages About This Manual !i,o. In procedure calls, the !i,o notation follows an input/output parameter (one that both passes data to the called procedure and returns data to the calling program). For example: error := COMPRESSEDIT ( filenum ) ; !i:i. !i,o In procedure calls, the !i:i notation follows an input string parameter that has a corresponding parameter specifying the length of the string in bytes.
Notation for Management Programming Interfaces About This Manual horizontally, enclosed in a pair of brackets and separated by vertical lines. For example: proc-name trapped [ in SQL | in SQL file system ] { } Braces. A group of items enclosed in braces is a list of all possible items that can be displayed, of which one is actually displayed.
Change Bar Notation About This Manual !o. The !o notation following a token or field name indicates that the token or field is optional. For example: ZSPI-TKN-MANAGER token-type ZSPI-TYP-FNAME32. !o Change Bar Notation Change bars are used to indicate substantive differences between this manual and its preceding version. Change bars are vertical rules placed in the right margin of changed portions of text, figures, tables, examples, and so on. Change bars highlight new or revised information.
Change Bar Notation About This Manual HP NonStop SeeView Manual—526355-004 xxii
1 Introduction The SeeView product provides multiwindowed menu-driven interfaces, or shells, to HP utilities for NonStop systems on HP 6500-series terminals and workstation emulators. With the multiprocess SeeView environment, you can have several windows showing the output of several programs simultaneously on your workstation. By taking advantage of the memory inside your workstation, the SeeView product allows you to have several different pages set up, each with its own set of windows.
Exiting the SeeShell Introduction The SeeShell main menu appears: To select an item from a menu, move the cursor to the desired item by using the TAB key or the cursor arrows, and press Return to select the item at the cursor. Pressing Return causes the SeeView program to execute any commands associated with the menu item you selected. When several menus are displayed, you do not have to exit one menu before making a choice from another. In the SeeView environment, all menus displayed are always active.
SeeView Overview Introduction • • To save your editing changes, position the cursor on the sill of the edit-mode window, type S or SAVE, and press Return. The changes are saved, replacing the original file. To exit without saving your editing changes, type E or ESCAPE on the sill of the edit-mode window. Then press SF16 twice to stop the SeeView program.
Menus Introduction uses the workstation’s internal memory to store its own pages, with different windows possible on the different pages. In effect, it gives you several logical workstations on one physical workstation, with different window arrangements on each page of internal memory. Menus The SeeView product gives you the ability to use menus to perform actions. You can use a menu to provide users with one or more choices and perform a set of commands when an item is selected from the menu.
Features Introduction deletion. Rather than stopping and starting a process every time you need it, you start it once in the SeeView program and keep it running in one of your windows. Accessing that process is then as simple as moving the cursor to a window assigned to that process, making a context switch quick and efficient. • • • • • • Text Scrolling: You can display the output of each process in one or more windows.
SeeView Terms Introduction • Simplified Interface: By associating complex sets of commands with a menu item, the SeeView product greatly reduces the detailed knowledge needed to use utilities for NonStop systems. SeeView Terms The following terms describe SeeView components. Task A task refers to a process that the SeeView program is communicating with. Tasks can have their output displayed in a window (or several windows).
Scroll Introduction another task. For example, when you start a PERUSE process from a TACL process, these tasks are called peer tasks. When the SeeView program is first started, it allocates memory to be used for all the caches it will create when tasks are started. A task is assigned a portion of this total cache pool the first time it is started, and the amount allocated to a task cannot be changed once assigned. At some point, the cache for a task will fill up.
Terminal Pages Introduction Terminal Pages Workstation models vary in the amounts of internal memory. SeeView bases the number of terminal pages depending on how much memory is available. On the 6530 series terminals, SeeView uses eight pages. On the 6526 series, the program uses 13. With some emulators, you can set the number of terminal pages. Help Page SeeView displays its Help page without disturbing any windows you set up on other pages.
Help on SeeView Statements Introduction Help on SeeView Statements For help on the SeeView statements, type HELP ALL and press Return from a free window sill (or press F14): For more specific information on a SeeView statement, type HELP, the name of the specific statement, and press Return; for example, HELP ACCEPT. For help on a function key, type HELP and the function key name; for example, HELP F1.
Introduction Help on SeeShell Menus and Menu Items HP NonStop SeeView Manual—526355-004 1-10
2 Using SeeShell Menus SeeView provides a ready-made, standard shell called SeeShell that allows you to work with files, display information, and run programs concurrently. You can display information and access programs on any of the terminal pages provided by SeeView.
System Devices Menu Using SeeShell Menus System Devices Menu The System Devices menu provides access to functions that enable you to obtain information about hardware devices connected to your NonStop system and to perform some management functions related to those devices.
Obtaining Disk Information Using SeeShell Menus Table 2-1. System Devices Menu Commands (page 2 of 2) Command Default Function All Functions Description Tape LISTDEV LISTDEV UP DOWN LAST LISTDEV Allows you to obtain information on tape devices on your system and to perform specified functions. Expand STATS, LINE STATS, LINE Displays Expand names on your system.
Changing a Command Using SeeShell Menus For the G-series and later, the default disk command is STATUS DISK. The SeeShell automatically determines which version of the NonStop OS is present and performs the correct command. You can change these commands (or actions) according to the device you select. Changing a Command You can change the command to be executed for a list of device names if the device name menu includes the Command? option. Command? displays a menu with a list of available commands.
Changing a Command Using SeeShell Menus For example, when you select the command LISTCACHE, that command appears at the top of the device name menu: If you select a disc drive, such as $SYSTEM, SeeView displays the current disc cache configuration for the selected drive in a PUP window: In the PUP window, you can scrolled left or right with the SF12 or SF13 function key to display any text that does not fit in the window.
Obtaining Printer Information Using SeeShell Menus labeled Peripheral Utility Program (PUP). In this case, the window label indicates that the operation is performed using the system utility PUP. To interact with the PUP window, move the cursor to the sill of that window, type one or more PUP commands, and press Return. Obtaining Printer Information When you select Printer on the Devtypes menu, SeeView displays a menu listing the printer device names on the system.
Obtaining Communications Device Information Using SeeShell Menus If you select a printer device name such as $LP, the SeeView program displays the spooler status for that device in a SPOOLCOM window: The SPOOLCOM window also has a sill. To interact directly with this window, place the cursor on the sill, enter a command, and press Return.
System Utility Menu Using SeeShell Menus interfaces for the FUP (available through the Files option), SCF, Pathway, and Spooler subsystems. When you select System Utility from the main menu, SeeView displays this menu: Select an item in the System Utility menu, to use system utilities, such as Backup and Restore, as well as file functions and a TACL window. Table 2-2, System Utility Menu Commands, outlines the commands available from the System Utility menu.
System Utility Menu Using SeeShell Menus Table 2-2. System Utility Menu Commands (page 1 of 2) Command Default Function All Functions Description Files Fileinfo View Clear GIVE INFO, DETAIL LISTLOCKS LISTOPENS LOAD LOADALTFILE LICENSE REVOKE PURGEDATA PURGE ! COPY DUP INFO RENAME SECURE EDIT Allows you to obtain file information on files in your current subvolume or a specified subvolume.
System Utility Menu Using SeeShell Menus Table 2-2. System Utility Menu Commands (page 2 of 2) Command Default Function All Functions Description Pathway None. Asks for process ID of a PATHMON process. PM Pwy Pgm Trm Tcp Srv Pm? Allows you to perform various operations on objects in a Pathway system. Restore Restore Restore Allows you to restore a subvolume or file from tape. Spooler Spool Job Col Dev Loc J* Allows you to perform spooler operations.
Performing File Operations 2 Using SeeShell Menus Performing File Operations To perform various file operations, select Files on the System Utility menu. SeeShell displays a prompt with the current default volume and subvolume, as the next illustration shows. To change the volume and subvolume, change the text displayed in the prompt. Enter a volume and subvolume to display the Fileinfo menu.
Performing File Operations If you select a file name such as DOC2 on the Fileinfo menu, SeeShell displays these information windows and additional menus: The View window displays the first few lines of the selected EDIT file. The Selected File window displays the fully qualified file name of the file selected. The three menus below the Selected File window list the options that you can perform on the file shown in the Selected File window.
Performing File Operations If you select the EDIT option, SeeShell displays the Editor? menus above the Selected File window. Select an editor on the Editor? menu to use that editor on the selected file. If you select one of the Seedit editors and that editor already has a window on another page of the terminal, the contents of the selected file appears in that window. (See Configuring Tasks on page 2-28.) Otherwise, the file appears on the current terminal page.
Multiple File Operations Once the file contents appear in the Seedit window, you can edit the copy of the file directly in conjunction with the edit-mode function keys. For help with the function key operations, press F14. Multiple File Operations To operate on multiple files, select File(s) on the options menu. When you select File(s), SeeView changes the label of the Selected File window to Selected Files: The File(s) option works as a toggle to alternate between single-file and multiple-file mode.
Multiple File Operations Selecting a file on the Fileinfo menu that is already selected deselects that file and removes its name from the Selected Files window. The View window displays the contents of the most recently selected file if that file is an EDIT file. If the file is not an EDIT file, the View window displays additional file information for the file.
Multiple File Operations For example, if the DUP option is selected, SeeView displays a prompt: To fileset.* [ ,options ] You can enter the volume and subvolume to which you want the selected files duplicated; for example, $SYSTEM.SEEDOCS.*.
Performing Backup Operations Performing Backup Operations If you select Backup on the utility menu, the SeeView program displays a prompt with the appropriate commands to back up the current default subvolume to tape: If necessary, you can edit the text in the prompt directly. The Backup command is executed when you press Return. The SeeView program displays a split screen with Backup and TACL windows: You can use this split screen to help manage the back-up operation.
Performing Backup Operations If you select the Pathway item, the SeeView program displays a prompt that requests the process ID of a PATHMON process: When you respond to the PATHMON prompt, by entering the process name $TRPM for example, SeeView displays an options menu labeled with the specified PATHMON name, as shown below. This menu lists operations that can be performed on the Pathway components associated with the specified PATHMON process $TRPM.
Performing Backup Operations This window label indicates the command that will be executed when you select a terminal name from this menu.
Performing Backup Operations To change the command to be executed for the terminals listed, select Command? from the terminal ID menu window. SeeView displays a menu of available commands: When you select one of the listed commands, such as STATS, SeeView redisplays the terminal ID menu window with the name of the newly selected command at the top of the window. (See the next illustration.) Once you change the command, you can select the Pathway terminal for which you want the new command to be executed.
Performing Spooler Operations 2 Using SeeShell Menus Performing Spooler Operations The Spooler option on the System Utility menu can help you perform a number of spooler operations: If you select Spooler, SeeView displays the Spool menu with a list of options, as the next illustration shows. Select Job from the Spool menu to display a menu list of spooler jobs for the current user.
Performing Spooler Operations If you select job 42, the SeeView program displays information about that job in a Spoolcom window.: To change the spooler command for the spooler jobs, select the Command? in the spooler jobs window. SeeView displays a list of available commands: Selecting one of the listed commands, such as JOB,LIST FIRST, redisplays the spooler job window with a new heading that reflects the newly selected command.
SeeView Extras Menu Once you change the command, you can select the spooler job for which the new command is to be performed. If you select job 42, SeeView displays the contents of the job file in a window labeled PERUSE: The Peruse window has a sill, so you place the cursor on the sill, type the command you want executed, and press Return.
SeeView Extras Menu When you select SeeView Extras from the SeeShell main menu, SeeView displays a menu: The following pages discuss the Color, Config, and External items on the SeeView Extras menu. The SeeView Extras menu provides miscellaneous SeeView features. See Table 2-3, SeeView Extras Menu Commands. Table 2-3.
SeeView Extras Menu Table 2-3. SeeView Extras Menu Commands (page 2 of 2) Command Default Function All Functions Description FastShell None None Causes the SeeShell script to be loaded into memory and invoked. This speeds execution of selected menu items. You must invoke FastShell to get the current SeeShell source. HELP None None Displays the help file specified by the ALTER HELPFILE statement of the SeeShell or your script.
Changing Screen Color Attributes Changing Screen Color Attributes To change the color or video attributes of SeeView windows and menus, select Color from the SeeView Extras menu. If you select Color, SeeView displays the Color menu shown in the next illustration. The Color menu lists the options that you can use to alter the color or video characteristics of SeeView windows and menus.
Changing Screen Color Attributes contains one of 16 unique video attribute combinations formed by the video attributes Dim, Blink, Reverse, and Underline. When this menu appears on a PC running PCT, you can change the background and foreground colors for a given video attribute combination by selecting the corresponding line on the menu. For example, selecting Line 1 Video Normal to display a menu listing a number of colors.
Configuring Tasks To save your colors for future use, select the S A V E menu item at the bottom of the list. Configuring Tasks Select Config from the SeeView Extras menu to declare user programs (called tasks) and create windows on these programs. If you select the Config item, the SeeView program displays a task configuration menu, as shown in the next illustration. Use the task configuration menu to declare user programs (called tasks) and to define the location of windows for these programs.
Editing a File the Seedit program is to be on the same subvolume as the SeeView program object. Cache 100 specifies the size of the cache (memory space) for the task SEEDIT1. TACL specifies the second task and window for terminal page 3. To save the configuration, move the cursor to the Save line on the menu, type the fully qualified name of the file to which you want to save the configuration, and press Return.
Executing External Script Files Once you enable edit mode for a window, you can edit the file directly by using the function keys described on the Help Page. (Press F14 to display the Help Page. (For more information on the Seedit utility and edit mode, see Section 4, Seedit Utility.) When you finish editing the file, you can save or abandon the changes by entering SAVE or ESCAPE, respectively, from the sill of the window. You can abbreviate SAVE as S and ESCAPE as E.
Executing External Script Files If you select External, the SeeView program displays the External menu, shown in the next illustration. If you select Command? from the External menu, the SeeView program displays a prompt next to the External menu: You can respond to the prompt by entering the name of any EDIT file, such as DISCS in the preceding example, that contains a SeeView script.
Custom Shells If you select the name of a script file listed on the External menu (DISCS, for example), SeeView executes the SeeView statements contained in that file: Custom Shells The standard SeeShell distributed with SeeView is organized so that the first three items on the SeeShell main menu provide features or functions that are useful to a large number of technical users.
SEENET SEENET • • • SeeNet is meant to provide functions that are common to all users in a network. You can create common SeeNet files to be shared among all nodes in your networks. The SeeView program searches for SEENET on the SeeView object file subvolume. The SeeNet script file is now distributed as part of the Network Statistics Extended (NSX) product. You use this script to display network-wide performance information collected by NSX.
SEECSTM HP NonStop SeeView Manual—526355-004 2- 34
3 Using the SeeView Program Running the SeeView Program To start SeeView, at the TACL prompt: 1> SEEVIEW /NAME/ SeeView Startup Syntax The syntax for the SeeView startup command follows. For information on installing the SeeView program and more details on SeeView startup modes, see Appendix A, Running the SeeView Program. SEEVIEW/ NAME [ pid ] [ ,IN file ] [ ,OUT file] [ statement ] [,option ] / NAME [pid] specifies the process name of the SeeView program. The SeeView program must be named.
Getting Around in the SeeView Program Using the SeeView Program Exiting the SeeView Program in Edit Mode To exit the SeeView program in edit mode, either: • • To save your editing, position the cursor on the sill of the edit-mode window, type S or SAVE, and press Return. The changes are then saved, replacing the original file. To exit the SeeView program without saving your editing, type E or ESCAPE on the sill of the edit-mode window and press Return.
Accessing the Help Page (F14) Using the SeeView Program Accessing the Help Page (F14) The Help page is a terminal page set aside to provide user status and help information. Its primary function is to serve as a quickly accessible reference page that you can use without disturbing the display, operation, or contents of any of the user pages. Several function keys access the Help page. F14 is the help key. It displays a list of topics you can ask for further help with.
Interacting With Windows Using the SeeView Program interpreter. The physical components of a window appear in Figure 3-1, Window Components. Figure 3-1. Window Components Free Windows The three types of windows in the SeeView program are free, assigned, and menu. Free windows have not been assigned to a user task or to a menu text cache. When a window is free, any commands entered on the sill of that window are commands to the SeeView language interpreter. Free windows do not have a heading.
Interacting With Windows Using the SeeView Program To assign a free window enter OPEN task on the sill of the free window and press Return. To reassign an assigned window, enter OPEN task on the sill of the assigned window and press Shift-Return. Menu Windows A window with a heavy- or double-line frame is a menu window.
Displaying Text Within Windows Using the SeeView Program You can use the left and right arrow keys to move the cursor along the sill. You can also use the following keys to edit any text on the sill: CharIns Inserts a space to the left of the character at the cursor position. CharDel Deletes the character at the cursor position. Ctrl-Return Moves the cursor to the end of the text on the sill.
Sending Commands (Return, Shift-Return) Using the SeeView Program S-Next Page Displays the last page of the text in the window. SF12 Moves the text to the right by the number of characters indicated by the current cursor position. For example, if the cursor is in column 1 of the current window, the text in that window is moved to the right by one character (unless the text is already all the way to the right).
Sending Commands (Return, Shift-Return) Using the SeeView Program and then pressing Shift-Return. When you press Shift-Return, SeeView acts directly on the command entered rather than sending it to any task associated with the current window. The output from the command processed by SeeView appears in the current window and is also saved in the cache associated with that window.
Responding to Prompts Using the SeeView Program Communicating With the SeeView Program You might sometimes want to send a command directly to SeeView without moving the cursor to a free window. Enter the command to SeeView on any sill (even if the window is assigned to a task) and then press Shift-Return. When you press Shift-Return, SeeView acts directly on the command entered rather than sending it to any task associated with the current window.
Displaying Different Terminal Pages (F1, F2, SF1, SF2) Using the SeeView Program Displaying Different Terminal Pages (F1, F2, SF1, SF2) The HP 6500-series terminals support multiple independently accessible pages. SeeView allows you to move quickly from one terminal page to another by using the function keys on the terminal. SeeView makes most terminal pages available for user-defined menus and windows. The pages available to the user are called user pages. The remaining page is called the Help page.
Return Key Using the SeeView Program To redisplay prior SeeView event messages in a free window at any time, use the Next/Prev Page keys on the right side of the keyboard. The Help Page is often useful for this purpose. Assigned and menu windows display messages or text in the cache associated with the user taskid that they are assigned to. The size of the message cache allocated to a given user task is determined the first time the task is declared or opened.
Break Key Using the SeeView Program task associated with the window, press Shift-Return. The OPEN statement is often used in this manner. Thus, a window assigned to FUP can be reassigned to TACL simply by entering this command on the sill of the window and pressing Shift-Return: OPEN TACL If the response exceeds the number of lines in the window, the first part of the response appears in the window and the remainder of the response can be viewed simply by paging ahead.
Control Characters Using the SeeView Program Control Characters Control characters have no meaning in block-mode operation. Instead, use the tilde character (~) to denote control characters entered from a window sill in block mode. SeeView transforms characters bracketed with the tilde that are entered from a sill into the corresponding control character values. For example, if the password for NULL.NULL is control NOP, enter: LOGON NULL.
Function Key Summary Using the SeeView Program Table 3-1.
4 Seedit Utility Seedit is a utility program supplied in the SeeView distribution subvolume. The program provides editing, file management, and other utility functions for the SeeView environment. Functions provided by Seedit range from loading an EDIT file into the cache associated with a window to monitoring a generic text log file such as a Pathway log file or an operations log such as $SYSTEM.SYSTEM.OPRLOG.
Editing Text Files Seedit Utility Editing Text Files The SeeView program makes it possible to edit the text associated with any window within its environment. This editing capability is called edit mode. The edit-mode feature is generic to the SeeView environment and exists for the text associated with any assigned or free window. To enable edit mode for any window, press either F5 or the Insert-Line key.
Saving a File Seedit Utility retrieve (cut and paste) between other edit-mode windows. Using F8 (copy) and F7 (retrieve). Saving a File Once editing is completed, to save changes, position the cursor on the sill of the editmode window, type S or SAVE, and press Return. The changes are then saved, replacing the original file. Note. Typing E or ESCAPE on the sill of the edit-mode window provides the option of terminating edit mode without saving any of the changes.
FILES Seedit Utility TO specifies the new terminal to connect to. If TO is not specified, the current Seedit terminal is used. HELLO group.user specifies the user of SeeView to connect to. You must supply this option if the SeeView you are connecting to is logged off. If the SeeView is not logged off, your Seedit must be logged on with the same user ID as the SeeView user ID.
GET Seedit Utility subvolume specifies a valid subvolume. When you specify a volume or subvolume, it becomes the new default subvolume for the Seedit task. fileset specifies a valid file set. * specifies either a file set or a generic file-name set. Examples These following examples demonstrate the FILES command: FILES{ show all files in default subvolume FILES X.
HELP Seedit Utility Example To exit edit mode, position the cursor on the window sill and enter: SAVE{ save to original file purging original. S{ same meaning as SAVE SAVE filename [!]{ save to another file, ! purges old one. ESCAPE{ escape edit mode, and don’t update file. E{ same meaning as ESCAPE HELP The HELP command provides a brief description of any of the Seedit commands. HELP [ ALL | command ] ALL specifies general help for Seedit. command specifies a valid Seedit command.
MONITOR Seedit Utility subvolume specifies a valid subvolume name. The subvolume you specify becomes the new default subvolume for the Seedit task. fileset specifies a valid file set. * specifies either a file set or a generic file-name set. Examples The following examples demonstrate the INFO command: INFO{ INFO INFO INFO info all files in default subvolume X.
MSG Seedit Utility • To exit the monitor mode, send a break message to Seedit. For example: BREAK seeditx Examples These examples demonstrate the MONITOR command: MONITOR $DATA.PWAY.PATHLOG{ show PATHMON log activity MONITOR $SYSTEM.SYSTEM.OPRLOG{ show OPRLOG activity MSG The MSG command sends message-text to the SeeView programs specified by distribution. MSG distribution message-text distribution specifies either the process name of a running SeeView program or a SeeView object file name on disk.
OBEY Seedit Utility OBEY The OBEY command causes the Seedit commands contained in the specified OBEY file to be executed. OBEY filename filename specifies a valid file name. Example This example demonstrates the OBEY command: OBEY myobey{ Obey commands contained in file MYOBEY PURGE The PURGE command purges (deletes) the specified filename. PURGE filename ! filename specifies a valid file name. ! purges the file without asking you for a confirmation.
SEND Seedit Utility startup-msg specifies text to be sent to the process just started. Considerations If R alone is entered (for example, R FUP), the filename is expanded using the $SYSTEM.SYSTEM subvolume. Otherwise, the filename is expanded using the current default subvolume. The default subvolume is changed with the VOLUME, FILES, or INFO command. Example This example demonstrates the RUN command: volume $data.myvol r fup run fup { runs $system.system.fup { runs $data.myvol.
SET Seedit Utility Considerations For a SeeView process to accept a SEND command, that process must have a task named MYMAIL. If a task MYMAIL has not been declared, the Seedit SEND or MSG command receives a security error 48. Anyone designing a custom shell that does not coexist with the Standard SeeShell needs to include the following statement in the custom shell to permit the MSG and SEND statements: TASK MYMAIL := $my; Note.
SUBVOLS Seedit Utility Examples These examples demonstrate the SET command: SET SET SET SET LOGFILE LOGFILE MAXRECS MAXWAIT $SYSTEM.SYSTEM.OPRLOG PATHLOG 30 30 SUBVOLS The SUBVOLS command displays the names of subvolumes on the specified system and volume. SUBVOLS [ [ \ system. ] [ $volume. ] [ subvolume | *] ] system specifies a valid system name. volume specifies a valid volume name. subvolume specifies a valid subvolume name.
USERS Seedit Utility Examples These examples demonstrate the SYSTEM command: SYSTEM \NEWYORK SYSTEM USERS The USERS command displays the process names of SeeView programs on a specified system. USERS [ object-filename ] object-filename specifies the SeeView program desired. Examples These examples demonstrate the USERS command: USERS{ Same as USERS SEEVIEW USERS \COMM2.seeview{ Show SEEVIEW users on \COMM2 VOLUME The VOLUME command allows the default volume and subvolume to be modified.
VOLUME Seedit Utility HP NonStop SeeView Manual—526355-004 4- 14
5 SeeView Language Elements This section discusses the SeeView language and includes several programming examples. The section is primarily for those who want to write SeeView scripts. SeeView language elements are the conceptual components that make up the SeeView programming language. These elements include statements, sections, procedures, menus, variables, intrinsics, operators, and expressions.
Program Structure SeeView Language Elements Program Structure SeeView programs consist of sections, procedures, and menus. These program elements have the following functions: • • • A section declares a group of statements to be executed immediately. A procedure declares statements to be executed with a CALL statement. A menu declares text that is to be stored in a named memory cache.
Procedures SeeView Language Elements When you first start the SeeView program, it determines the name of its shell file and executes all sections contained in that shell file. The SeeView program also executes sections in a shell file or script when an INVOKE statement references a file containing SeeView statements or when the execute-current-shell function key, SF15, is pressed.
Menus SeeView Language Elements The string intrinsics #MENULINE, #MENUCOL, #MENUWIDTH, #MENUHEIGHT, #FKEYLINE, and #FKEYCOL give global information describing the calling menu’s location, menu size, and function key coordinates. The string intrinsics #MENUTEXT, #MENUINPUT, and #MENUTOKEN give global information about the calling menu’s invocation, including the menu text, menu input, and menu token being pointed to.
Menus SeeView Language Elements The menu production mechanism forms the basis for a variety of techniques to create menus that are described in this section.
Menus SeeView Language Elements When you point the cursor to a menu line representing a device type and press Return, a PUP Listdev for the selected device type appears next to the device type menu, as Figure 5-1 shows. Figure 5-1. SeeView Output From the Program in Example 5-3 Default Productions You can declare menus with a default production. When you declare a default production for a menu, the text lines that do not have a production associated with them automatically use the default.
Menus SeeView Language Elements Example 5-4. Example of a Default and Shift Production (page 2 of 2) ?SECT Main { {---------} PAGE 2; { WINDOW DevTypes { MENU "CALL Listdev(#MENUTEXT)"{ ,"CALL HelpDev(#MENUTEXT)"{ CACHE /disk/ UNTIL /*/ { SIZE 13; { Declare main sect to do setup On terminal page number 2. Declare a menu window with a default production shift production where #menutext is the text in the selected menu.
Menus SeeView Language Elements Example 5-5. Example of Menus ?MENU MyMenus { Declare text cache "MyMenus" {------------} Devices <== CALL PullDown ("Disk", "CALL Listdev(#menutext)") Disk Tape Term Printer Expand <== CALL Listdev ("type 63") * Utility <== CALL PullDown ( "TACL" ) TACL <== LINE 4; OPEN tacl; FUP <== LINE 4; OPEN fup; PUP <== LINE 4; OPEN pup; VIEWSYS <== RUN viewsys * ?PROC PullDown ( #target, #production ) {-------------------------------------} PARM #target; { Target text in menu cache.
Menus SeeView Language Elements Productions can invoke other SeeView programs or scripts contained in EDIT files or caches by using the INVOKE statement. This provides a way for menus to invoke external menus and sections, as well as declare external procedures. This permits extensible development and maintenance of external menus and procedures. The External menu item under SeeView Extras provides an example. (See Example 5-15 and Figure 5-13.
Menus SeeView Language Elements Example 5-6.
Variables SeeView Language Elements Figure 5-3. SeeView Output From the Program in Example 5-6 Variables You can define three types of symbolic variables in the SeeView environment: integer, string, and task. Integer or string variable names can be any combination of alphanumeric characters up to 16 characters in length. Task variable names can be any combination of alphanumeric characters up to 15 characters in length. The VARIABLE statement declares integer and string variables.
Integer Variables SeeView Language Elements Integer Variables Integer variables represent 16-bit signed integers. For example: TASK psmail; VAR x := 70*3 ,y := x/4 ,z := y * "2" ,t := psmail ; { { { { 210 52 104 PSMAIL's numeric taskid You can use integer variables in place of a taskid. String Variables String variables represent strings of up to 132 ASCII characters and have an implicit length associated with them. You must prefix string variable names with the string type flag #.
Task Variables SeeView Language Elements The program in Example 5-7 displays the result of the command contained in the string variable #command in a TACL window. When you use a WINDOW statement without the CACHE option, there is an implied wait for the process to prompt or the window to fill with text. Using the CACHE option builds a NOWAIT window on the TACL cache. NOFRAME causes the TACL window frame not to be redrawn if it exists, thus reducing the amount of I/O required. Example 5-7.
Expressions SeeView Language Elements Expressions The term expression refers to any combination of: • • • • • • • • • Integer constants Integer variables String constants String variables Arithmetic operators ( :=, +, -, *, /, MOD) Relational operators (<, >, >=, <=, <>, =) Boolean operators (AND, OR, NOT) Shift operators (>>, <<) String functions (#TAKE, #DROP, #TRIM, #SIZE) Expressions permit mixing all of these items.
String Assignment SeeView Language Elements These examples show integer assignment statements: LET x := y+z; x := y+z; IF x:= y+z THEN { { { { This is an integer assignment statement. This is also an integer assignment statement. This also assigns x to the sum of y + z. and executes statements after the THEN if x <> 0. String Assignment String assignment statements begin with the string type flag character #. To concatenate strings, use the & (ampersand) character.
String Operators SeeView Language Elements String Operators String operators are built-in string functions that perform operations on string variables and intrinsics. String operators return the size of a string variable or intrinsic (for example, #SIZE #s). They also perform token operations on a string, such as TAKE, DROP, or TRIM tokens in a string.
Modal Environments SeeView Language Elements Modal Environments Modal prompts constrain the SeeView environment so that you can respond only to a single prompt or dialogue box. The word modal indicates that the environment enters a mode that has special limitations placed on what you can do. Modal prompts are useful for certain situations, but they have these disadvantages: • You can respond only to the specific prompt.
Modal Prompts SeeView Language Elements a function key, the ACCEPT statement completes. The prompt is then cleared, and the response to the prompt is returned in output parameter #answer. • • ?PROC Fileinfo uses parameter #subvol to display FUP information for #subvol. ?SECT EnterSubvol is executed when the script is invoked. Example 5-8. Example of Modal Prompt Usage ?MENU Scratch ?PROC Prompt(#prompt,#answer) {---------------------------- { Proc does a waited prompt.
Modeless Prompts SeeView Language Elements Figure 5-4. Modal Prompt From the Program in Example 5-8 When you press a function key, the ACCEPT statement completes, the prompt is erased, the procedure returns the user response text “$DATA.SEEC20” in the #subvol parameter, and ?PROC Fileinfo displays the output shown in Figure 5-5. Figure 5-5. SeeView Output From the Program in Figure 5-4 Modeless Prompts A modeless prompt is established when you associate a production with a window.
Modeless Prompts SeeView Language Elements • • ?PROC FileInfo uses input parameter #subvol to display FUP INFO * output for #subvol. ?SECT EnterSubvol is executed when the script is invoked. Example 5-9. Example of Modeless Prompt Usage ?MENU scratch ?PROC Prompt(#prompt,#action) {---------------------------- { Proc does a nowaited prompt.
Field Attribute Productions SeeView Language Elements The script in Example 5-9 is smaller and simpler than the script in Example 5-8 but provides greater functionality. Generally, modeless scripts are less complex than modal scripts, but offer more functionality. Figure 5-6. Modeless Prompt From the Program in Example 5-9 Field Attribute Productions The WINDOW statement FIELDS option defines windows or dialogue boxes with multiple input-output fields.
Field Attribute Productions SeeView Language Elements Example 5-10. Example of Field Attribute Production Usage (page 2 of 2) ?PROC GetPerson ( #first, #last, #addr, #city, #st, #zip ) {--------------------------------------------------------} PARM #first OUT, #last OUT, #addr OUT, { Declare parms #city OUT, #st OUT, #zip OUT; { as output parms.
Updating Fields SeeView Language Elements Figure 5-7. SeeView Output From the Program in Example 5-10 To determine the field attributes for each field in a FIELDS window, use the default attributes of the WINDOW FIELDS option in combination with the individual field attributes specified by the field attribute productions stored in cache. Thus the field attributes for the field Zip are underline, numeric, notab.
Updating Fields SeeView Language Elements • • Enter a string variable name in a field to display that variable’s value in the field when a window displays that field with the FIELDS option. For example, the Address field in Example 5-11 displays “500 West Main”, the value of the variable #address, when the WINDOW statement in the ?SECT main is executed. Use the DISPLAY statement FROM option to update fields with data contained in another cache.
Function Keys SeeView Language Elements This statement updates the City, State, and Zip code fields by using the values contained in the CityStateZip cache: DISPLAY FIELD 3 FROM CityStateZip Figure 5-8. SeeView Output From the Program in Example 5-11 Function Keys The WINDOW statement KEYS option associates function keys with windows in the SeeView environment. See the Main section of Example 5-12.
Function Keys SeeView Language Elements Example 5-12. Example Using Function Keys to Perform SQL Operations ?MENU Person {-----------} Last [ ] First [ ] :: (alpha) (alpha) Address [ ] City [ ] State[ ] Zip[ ] :: (a) (a) (n notab) * ?MENU PersonData ?PROC PersonMaint {----------------} { Maintains Person SQL Table, F5 add, F6 delete, F7 list. {-------------------------------------------------------} VAR #first, #last, #data; TASK SQLci; { Declare SQL ci. LINE #menuline, #menucol; { Address calling window.
Function Keys SeeView Language Elements Figure 5-9. SeeView Output From the Program in Example 5-12 When F5 Is Pressed The procedure PersonMaint is called when you press F7. The procedure issues the SQLCI command to list records stored in the SQL Person table, shown in Figure 5-10 on page 5-27. Figure 5-10.
Window Productions SeeView Language Elements Window Productions The WINDOW statement PRODUCTION option associates a default production with nonmenu windows. This option can even associate a production with an edit-mode window. Example 5-13 shows a program that displays the definition of the word selected by the cursor when you press SF10. Example 5-13.
Window Productions SeeView Language Elements If #word is found in the dictionary, a window appears on that definition. Figure 5-11.
Invisible Fields SeeView Language Elements Invisible Fields The BLANK field attribute defines invisible, or blank, input-output fields. Example 5-14 shows a program that uses the BLANK field attribute to suppress the display of data entered into the Password field of a logon screen. Example 5-14. Example of Defining a Blank or Invisible Input Field ?MENU LogonScreen {-----------------} Group [ ] User[ Password[ * ?MENU ValidUsers {---------------} Operator.Bob,passwd Operator.Mike,smile Operator.
Invisible Fields SeeView Language Elements field production :: (u) (u) indicates that the Group and User fields should be underlined, and the script production <== CURSOR #fkeyline+1 causes the cursor to move to the next line when you press Return. The Password field production :: (R BLANK) causes data entered in this field to be invisible, or blank, and sets reverse video for it. • • ?SECT Main displays the logon screen window shown in Figure 5-12.
Direct Field Updates SeeView Language Elements Direct Field Updates You can program dialog box fields individually so that they can be directly updated. Example 5-15 shows a program that displays a menu of permissible field values whenever Return is pressed with the cursor in a field. Example 5-15.
Direct Field Updates SeeView Language Elements Example 5-15. Example Program Showing Direct Field Update Techniques (page 2 of 3) {-------------{ Display a menu of legal values for the selected field. { Using the field
Direct Field Updates SeeView Language Elements Example 5-15. Example Program Showing Direct Field Update Techniques (page 3 of 3) ?proc InsertText {--------------{ Insert text from calling menu #menutext in parent window field. { The parent window and insertion field location are passed. {---------------------------------------------------------------PARM ParentLine, ParentCol, { Location of parent window.
Direct Field Updates SeeView Language Elements Figure 5-14. Output When Return Is Pressed in the First Name Field The Person dialog box shown in Figure 5-14 is protected while the menu of FIRST name values is displayed. This presents users with what appears to be a modal screen because they cannot access the parent dialog box. However, the script is in fact modeless because it does not require an ACCEPT FKEYWAIT statement.
SeeView Externals SeeView Language Elements SeeView Externals The term external refers to any SeeView program, or script fragment, that can be invoked from the External menu of the standard SeeShell. The program in Example 5-16 provides an external script that you can use to declare a command interpreter task and display a window on that task. You can specify the location and size of the window. A script contained in an EDIT file is an external script.
ServerMode SeeView Language Elements • ?PROC GetConfig is called when you put the cursor in the Config window and press Return. The procedure accepts the data fields from the screen, declares the specified task, performs context checks on the input variables, issues a command to the task, and displays a window on the specified task as shown in Figure 5-17 on page 5-37. Figure 5-17.
ServerMode SeeView Language Elements Example 5-17. Example of a SeeView ServerMode Script ?PROC HandleRequest ( #request, ReqTaskid ) {-----------------------------------------} { Use and contained in #request to perform operation. { Return result to ReqTaskid in a single large blocked reply msg.
ServerMode SeeView Language Elements Example 5-18. Server Output From the ServerMode Script in Example 5-17 1> PARAM SERVERMODE 3 2> SEEVIEW/NAME $SEEV, IN ASERVER/ Seeview - T6965C30 - (28MAR92) Processing your request Processing $DATA.SEEVIEW.ASERVER (?SECT READRECEIVE) 15:08:56 15:09:02 15:09:08 15:09:10 15:09:14 $SEEV $SEEV $SEEV $SEEV $SEEV Received: Received: Received: Received: Received: FUP FUP FUP FUP FUP CREATE $DATA.TEST.A CREATE $DATA.TEST.B CREATE $DATA.TEST.C CREATE $DATA.TEST.
ServerMode SeeView Language Elements HP NonStop SeeView Manual—526355-004 5- 40
6 SeeView Programming The SeeView product includes a programming language that allows you to simplify the interface to utilities for NonStop systems by providing integrated point-and-click interfaces. Once you learn this language, you can add new look and feel to virtually any HP conversational utility you choose and also add this capability to the concurrent environment provided by SeeView, making SeeView users more productive.
Understand the SeeView Program SeeView Programming • • Sample script in Appendix C, Sample Script Script for the standard SeeShell Accessing the Script for the SeeShell 1. Select FastShell from the SeeView Extras menu to load the SeeShell script into memory and invoke it. 2. Select SeeShell from the SeeView Extras menu to display the current SeeShell source. 3. Use the function keys, Prev Page and Next Page, to scroll through the script. 4.
Design the Presentation Interface SeeView Programming Design the Presentation Interface Design the presentation interface by following these guidelines: • • • • • • • • • Design a Presentation Interface, Not a New Application Understand the Product Use the Product as a New User Develop a Firm Understanding of Utility Command Structure Define What You Want Your Script to Accomplish Establish Menu and Window Contents Follow Conventions for Placing Menus and Windows Follow Human Interface Standards Identif
SeeView Programming Develop a Firm Understanding of Utility Command Structure in command syntax not only helps with the design of an interface but also greatly simplifies the implementation, usability, and readability of the script. Develop a Firm Understanding of Utility Command Structure Study the manuals and reference summaries. Your goal is to gain a firm understanding of the command structure and limitations of the utility.
SeeView Programming Follow Conventions for Placing Menus and Windows Follow Conventions for Placing Menus and Windows Menu and window placement, sizing, and type come next. The following four conventions will put your script into a normally accepted class of scripts in the SeeView user’s world. • • • • Have your scripts use page 1 of the terminal and then page 2 if you need it.
Identify Which Types of Menus to Use SeeView Programming Identify Which Types of Menus to Use Decide what types of menu items you are going to use. In general, you can build four types of menu functions using the SeeView language: • • • • Standard: An item within a menu that executes commands or displays information when selected. Input: An input field within a menu where text can be entered, followed by a carriage return. Also referred to as a prompt or input production.
Develop the Script SeeView Programming Develop the Script Follow these guidelines as you develop the script: • • • • • • • Develop Top-Down Use Relative Menu Locations Use the Same Cache for Each Menu Use Default Productions Write Your Procedures Comment As You Code Test As You Code Develop Top-Down When you write a script, do it in a top-down manner. First, declare a menu-cache (using the ?MENU directive) and enter the text that is to appear for all the menus in the entire script.
Use the Same Cache for Each Menu SeeView Programming Use the Same Cache for Each Menu You need not declare a separate ?MENU cache for each physical menu that is to appear on the screen. In the SeeView program, a cache is a linearly linked sequential list of strings containing menu items, data, or commands. Each ?MENU cache requires a task control block, or TCB, so a cache can have any of the attributes of a TASK. The minimum size of a cache is one memory page.
Write Your Procedures SeeView Programming powerful way of associating a common set of rules with an entire list of objects (menu items). Try to use default productions when you use menus. If the same commands are to be executed for multiple items in the same menu, use default productions. If one or two menu items do not conform to the default production’s rules, you can associate productions directly with the menu items so that these productions override the default.
Test As You Code SeeView Programming Test As You Code Test your script as you code. In the SeeView program, you can test the code as you write it by pressing SF15 to execute it. Also, if you are having an intermittent bug, enter ALTER STMTTRACE ON from the Help page and wait for the bug to occur. A complete step-by-step source statement trace is made available on the Help page with the actual script.
7 SeeView Interpreter Interface The SeeView language interpreter accepts statements from: • • • • Window Sills Menu Production Disk Files or Text Caches Edit-Mode Windows on the Help Page Window Sills You can execute SeeView statements directly by entering them on a window sill and pressing Return or, if the window is not free, Shift-Return. You use the OPEN statement often in this manner. Entering HELP from a free window provides a summary of all SeeView statements and function key operations.
Edit-Mode Windows SeeView Interpreter Interface Edit-Mode Windows You can interactively develop and execute a SeeView program from a window that is in edit mode on the Help page. This virtual window interface to the SeeView interpreter provides a simple way to develop and debug SeeView programs. The following steps load the current shell into a special window labeled SeeView on the Help page. Once you load a program into the SeeView window, you can debug it.
Edit-Mode Windows SeeView Interpreter Interface Figure 7-1. Example of Edit-Mode Language Interface on the Help Page The numbers 8 (2,9) at the end of the error message in Figure 7-1 indicate: • • • The source file sequence number where the error occurred (line 8). (If you enter LIST line-number on the sill of an edit-mode window and press F12, you position the cursor on that line number.) The line number in the current procedure or section (line 2 of section Main).
Edit-Mode Windows SeeView Interpreter Interface Example 7-1. Example of a User-Defined SEECSTM File ?MENU MyMenu {----------{ This menu provides invocation and access to: { Seedit1 Seedit editor on page 3. { Seedit2 Seedit editor on page 4 with a larger cache. { TACL1 TACL on page 5. { PERUSE Peruse on page 6. { TACL2 2nd TACL on page 7.
8 SeeView Directives This section describes the SeeView interpreter directives ?MENU, ?PROCEDURE, ?SECTION, and ?SEEVIEW and explains how each functions in a SeeView script. PROC is an abbreviation for PROCEDURE, and SECT is an abbreviation for SECTION. When a keyword is prefixed by a question mark in the first character position of a line in a SeeView program, the combination of keyword and question mark is called an interpreter directive.
PROCEDURE SeeView Directives Example 8-1. Example of MENU Directive ?MENU items {---------} Dates <== Today <== January <== February <== March <== April <== May <== .. December <== [ ? ]<==? CALL CALL CALL CALL CALL CALL CALL dates dates dates dates dates dates dates ("today") ( "1/1" ) ( "2/1" ) ( "3/1" ) ( "4/1" ) ( "5/1" ) { { { { CALL CALL dates dates ("12/1" ) (#menuinput) { call parm = "" call parm = "today" call parm = "1/1" ..
SECTION SeeView Directives Use the PARM declaration within a procedure to reference string and integer parameters passed by the CALL statement. String Intrinsics provide additional information regarding the current calling environment. (See also HELP #, #MENU.. #TASK...intrinsics, and WITH statements.) You can invoke procedures from menus, sills, other procedures, or another shell environment such as SEECSTM.
SEEVIEW SeeView Directives The version has a format of Vxx or VxxSPR, where V represents the general software release series, xx represents the release version (D40, for example), and SPR represents the SPR version (such as D40AAD). Example 8-2 shows how to use the SEEVIEW directive. Example 8-2. Example of SEEVIEW Directive ?SEEVIEW D40 { Script requires SeeView D40 or later ?SECTION TaclWindow {------------------} { Display a tacl window that passes F16 { through to TACL.
9 SeeView Statements and Script Symbols This section describes the SeeView statements and script symbols in detail. The statements are arranged in alphabetical order, and each statement is covered in a separate subsection. The subsections describing the script symbols follow the statement sections. Table 9-1 summarizes the SeeView statements.
SeeView Statements and Script Symbols Table 9-1. SeeView Statement Summary and Abbreviations (page 2 of 3) Statement Abbrev.
SeeView Statements and Script Symbols Table 9-1. SeeView Statement Summary and Abbreviations (page 3 of 3) Statement Abbrev.
SeeView Statements and Script Symbols ACCEPT ACCEPT The ACCEPT statement reads fields from the screen and stores this information in string variables or a message cache. Use the ACCEPT statement to read data from the terminal screen and store this information in a list of user-defined string variables or in the cache associated with a taskid. You can specify both a list of string variables and a cache taskid for the same ACCEPT statement.
SeeView Statements and Script Symbols ACCEPT FKEYWAIT specifies that the SeeView program wait for a function key to be pressed before performing the ACCEPT operation. During this wait interval, other SeeView function key operations are not available. Use the #FKEY intrinsics to determine the function key to be pressed. #FKEY returns values 1 through 16 for function keys F1 through F16 and values 17 through 32 for shifted function keys SF1 through SF16.
SeeView Statements and Script Symbols ACCEPT taskid specifies an arithmetic expression as a valid taskid number. The cache associated with this taskid is the cache that the ACCEPT statement applies to. FIELDPERLINE maps the data received from each field into a separate line of cache. This provides a generalized means of processing the lines of text accepted from an input area. If you do not specify FIELDPERLINE, data received from the screen is mapped column for column directly into the cache.
ACCEPT SeeView Statements and Script Symbols This option is similar to the INTO option except that each field received from the screen is pushed to a separate cache line and is prefixed by the row column screen location that the data came from. For example, if field DATA came from row 3 column 10, the cache line contains 003 010 DATA. Control characters are translated to the ? character. The TRACE option is primarily for debugging. taskid specifies an arithmetic expression as a valid taskid number.
ACCEPT SeeView Statements and Script Symbols Examples This example reads the input data associated with the name, address, and phone menu fields into the local string variables #name, #address, and #phone and then inserts this input into an SQL table using the SQL conversational interface (SQLCI): ?MENU person {-----------} Name [John Doe Address [100 Main, Plaines, IL Phone [901-555-5555 * ?PROC GetPerson {--------------} LINE #menuline,#menucol; VAR #name, #address, #phone; ACCEPT #name, #address, #phon
ALTER SeeView Statements and Script Symbols ALTER The ALTER statement displays or alters various configuration parameter values.
ALTER SeeView Statements and Script Symbols [ TESTLL ON | OFF [ VERTICALBREAK ON | OFF [ WORDTAB ON | OFF ] ] ] VOLUME vol-subvol specifies the current default vol-subvol for the SeeView program. vol-subvol specifies: • • The default volume and subvolume assigned to user processes started with the TASK, OPEN, or RUN statements unless overridden by the VOLUME vol-subvol option in the TASK, OPEN, or RUN statements. The location of the data dictionary used by the GRAPH statement when the GRAPH record.
ALTER SeeView Statements and Script Symbols SAVEFILE filename specifies the file name that the save-screen-to-savefile function key (SF11) saves the current screen to. For more information, see SF11 documentation (save screen to savefile). TRACEFILE filename specifies the file name of the current trace file. IOTRACE and RECVTRACE information is written to this file. It is the same file specified with the Seedit utility command SEND AUDIT FILENAME filename. The filename can be a string expression.
ALTER SeeView Statements and Script Symbols SHIFTPRODUCTION string-exp defines a global default shift production to be applied to any subsequent WINDOW statement declarations. For example: ALTER SHIFTPRODUCTION "CALL ShiftHandler" causes subsequent WINDOW statements to be declared with a shift production equal to “CALL ShiftHandler”. When you press Shift-Return, that production is executed.
SeeView Statements and Script Symbols ALTER COLORTABLE ON | OFF specifies the PCT colortable for PCs running PC6530 revision C or higher. The COLORTABLE ON option causes SeeView to automatically reload the PCT colortable when SeeView goes through I/O recovery. The PCT colortable is reloaded with the contents of the SeeShell global variable #ZZCOLORTABLE. The default is OFF, but it is automatically turned on by the standard SeeShell when SeeView is running from a PC with PC6530 revision C or higher.
SeeView Statements and Script Symbols ALTER ECHOSUPPRESS ON | OFF specifies whether text entered on the sill of an assigned window is echoed at the corresponding location of the prompt in the upper output portion at that same window. ECHOSUPPRESS OFF is the default. It indicates that text entered on the sill of a window is echoed.
SeeView Statements and Script Symbols ALTER HIGHPINTASKS ON | OFF specifies whether TASK, RUN, and OPEN statements attempt by default to launch processes as high or low PIN processes. The term PIN means process identification number. A high PIN is a process that runs with a PIN greater than 255. ON implies TASK, RUN, and OPEN statements attempt to create processes that run as high PINs. When this option is on, processes are started using the Guardian procedure PROCESS_CREATE_.
SeeView Statements and Script Symbols ALTER line-length If line-length is set greater than zero, the join width is the smaller of either the current window width or line-length. If line-length is less than zero, the join width is the window width reduced by that negative amount. In other words, a negative line-length defines the size of the right margin.
SeeView Statements and Script Symbols ALTER MULTIWINDOWS ON | OFF specifies whether the window below or to the right of the window that is broken with a break-window operation (function key F9) is a free window (MULTIWINDOWS OFF) or multiple windows assigned to the same taskid (MULTIWINDOWS ON). The default, MULTIWINDOWS OFF, causes a break-window operation to create a free window.
SeeView Statements and Script Symbols ALTER QUEUE ON | OFF specifies the value for the QUEUE attribute option for user tasks declared with the OPEN or TASK statements. QUEUE OFF, the default, indicates that the SeeView program automatically replies to all simple write messages from the task. QUEUE ON indicates that the SeeView program does not automatically reply to any messages, including simple writes, from the specified task.
SeeView Statements and Script Symbols ALTER operations to its destination in a single I/O operation. It still appears to the user that each single operation is a discrete operation. • • When the REFRESH operation is enabled, and the function keys F1 and F2 are used to switch terminal pages, all REFRESH I/O operations are automatically piggybacked onto the same input-output operation as the select terminal page operation.
SeeView Statements and Script Symbols ALTER The default is SETMODE110 OFF. SILLERASE ON | OFF specifies whether text on a window sill from the cursor position and to the right of the cursor is erased when you press Return. Some users find it useful to retain the text to the right of the cursor on a window sill. SILLERASE OFF permits this. The default is ON. SILLSCROLL ON | OFF specifies the behavior of function keys F3 and F4.
SeeView Statements and Script Symbols ALTER TESTLL ON | OFF specifies whether extended memory-linked list diagnostics are enabled. This option is for debugging purposes. The default, TESTLL OFF, is the recommended setting. VERTICALBREAK ON | OFF specifies whether a symmetric break window operation is to break the window into two equal sized horizontal windows (VERTICALBREAK ON) or two vertical windows (VERTICALBREAK OFF). The default is ON.
SeeView Statements and Script Symbols BEGIN BEGIN BEGIN marks the beginning of a compound statement. You typically use the BEGIN term in iteration or conditional statements when a group of statements is interpreted. BEGIN statement; [ statement;...] END statement specifies any SeeView statement. The term compound-statement refers to the block of statements delimited by the BEGIN .. END; delimiters. A compound statement can appear anywhere a simple statement can appear.
SeeView Statements and Script Symbols BELOW Example This example demonstrates how to use the BELL statement: IF NOT ok THEN BEGIN BELL; MSG (REVERSE BLINK) "Warning, not ok!!"; END ELSE MSG "ok"; BELOW The BELOW statement sets the current buffer address to the screen position just below the last menu referenced. Use the BELOW statement to position a window or menu directly below the last referenced menu.
SeeView Statements and Script Symbols BESIDE BESIDE The BESIDE statement sets the current buffer address to the screen position just to the right of the last menu referenced. Use the BESIDE statement to position a window or menu directly to the right of the last referenced menu. This statement provides a convenient way of specifying the screen buffer address that is just to the right of the last menu, rather than having to calculate that address.
SeeView Statements and Script Symbols CALL taskid-exp specifies an integer taskid expression that indicates the taskid number of the process to receive the break message. \node specifies the network node name of the process to receive the break message. $process-name specifies the process name of the process to receive the break message. cpu,pin specifies the CPU number and process identification number of the process to receive the break message.
SeeView Statements and Script Symbols CALL parm specifies optional parameter string or integer expressions to be passed to the called procedure. Separate parameters with commas and surround them with parentheses. Use the PARM statement to declare parameter variables in a procedure. For more information, see the PARM statement.
CI SeeView Statements and Script Symbols CI The CI statement allows SeeView to execute in command interpreter (CI) mode. This mode allows SeeView scripts containing PROMPT statements to provide a command interpreter interface. CI [ shell-filename ] [ (section-name) ] shell-filename optionally specifies the shell file name to be used when SeeView runs. If no shell filename is specified, the default CI-mode shell named SEEiSHEL is used.
SeeView Statements and Script Symbols CLEAR CLEAR The CLEAR statement clears data either from an entire page or, if entered from a window, only from the window area. CLEAR Considerations If you use the CLEAR statement to clear a page, all windows on that terminal page, including edit-mode windows, are deleted. The processes associated with the window still exist, and their interprocess communication context is unaffected.
SeeView Statements and Script Symbols CURSOR CURSOR The CURSOR statement specifies where the cursor should be placed on the current terminal output page, defined by the PAGE or SETPAGE statements. The upper-left corner of the screen is location 1,1. The lower-right corner is 24, 80. CURSOR line-exp [, column-exp ] line-exp specifies the vertical line number location. Absolute line numbers range from 1 through 24, top to bottom of the screen. column-exp specifies the horizontal column location.
DELAY SeeView Statements and Script Symbols initialization-exp specifies an optional initialization expression used to initialize the value of the declared variable. The initialization-exp can be either an integer expression such as (5+60/10) or a string expression such as “THE TIME IS” & #TIME. You can initialize string variables to either a string or integer value. You must initialize integer variables to an integer value.
SeeView Statements and Script Symbols DELETE DELETE The DELETE statement deletes all lines of text contained in the cache memory associated with the specified task. DELETE cache-taskid ! cache-taskid identifies the cache memory that is to have its contents deleted. The contents are deleted, not the actual taskid. ! indicates that you want to perform the delete. Because the DELETE statement completely destroys all data stored for a given task or set of tasks, the exclamation point (!) is required. Note.
DISPLAY SeeView Statements and Script Symbols DISPLAY The DISPLAY statement maps a list of string expressions or cache data elements into the fields defined by the window located at the current buffer address. If no window is at the current buffer address, or the window does not have the FIELDS attribute, a runtime syntax error appears.
SeeView Statements and Script Symbols DISPLAY CACHE index specifies the ordinal record index in cache where the display is to start. If you do not specify CACHE index, index zero is implied. Cache indexes 0, 1, ..., correspond to the first, second, ... records in cache, and -1, -2, ..., correspond to the last, second from last, ..., records in cache. FIELD | FIELDINDEX start-field-index-in-window indicates the ordinal field index in the window where the display should start.
SeeView Statements and Script Symbols DISPLAY PROTECTONLY | PROTECT indicates that only protected fields are accessed with the DISPLAY statement. The FIELD and FOR options apply only to protected fields. VIDEOTEMP video-and-field-attributes indicates that the video and field attributes for the specified fields are temporarily set to the specified video-and-field-attributes. For a list of allowable attributes, see the FIELD option of the WINDOW statement.
SeeView Statements and Script Symbols Example This example shows how you can use the DISPLAY statement: Example: ?MENU matrix { will contain matrix of [ ] fields. ?MENU data { data accepted from matrix on screen. ?PROC ShowMatrix ( rows, cols, width ) {------------------------------------} { Proc builds a fields window matrix of "rows" x "cols" { elements, where each element is "width" characters { wide. Matrix functions are Init-f5, Delete-f6, Add-f7.
SeeView Statements and Script Symbols DISPLAY ?PROC accept (rows, cols) {-----------------------} { Accept data from matrix and add all "cols" for each row. { Display result in the result column at the end of each row.
SeeView Statements and Script Symbols DO DO The DO statement performs iteration until the numeric value of an expression is nonzero. DO statement UNTIL expression ; statement represents the SeeView statement that is to be reiteratively performed. You can use a BEGIN term, followed by multiple statements and an END term, to delimit a compound statement for execution. Nested statements are allowed.
DOWN SeeView Statements and Script Symbols DOWN The DOWN statement moves the buffer address down a row relative to the current buffer address. DOWN [: expression [: char ] ] expression provides for moves greater than one. char specifies a single character that you can use to smear expression times in the indicated direction. Smear means to use the specified char to mark all locations moved through by the move operation.
SeeView Statements and Script Symbols EXECUTE EXECUTE The EXECUTE statement permits dynamic creation and execution of SeeView statements. EXECUTE string-exp | CACHE taskid string-exp specifies one or more SeeView statements to be executed. CACHE taskid designates the taskid of the cache that is to be invoked or executed. Considerations The EXECUTE statement permits dynamic creation and execution of SeeView statements.
FLUSH SeeView Statements and Script Symbols For example, the WINDOW statement has many options that are specified with keywords. You can make these options into parameters by declaring a string variable that contains these options, such as #WindowOptions:=“CACHE LAST EOFONLY” and then performing: EXECUTE "WINDOW fup " & #WindowOptions. 4. A fourth use of the EXECUTE statement is to associate procedural rules with keywords contained in a file or cache.
FOR SeeView Statements and Script Symbols Example This example shows how to use the FLUSH statement. VAR #pages := #PAGESUSED; WHILE #pages<>"" DO BEGIN PAGE #TRIM #pages; FLUSH; WAIT 1, refresh; END; { { { { { #pages is list of pages, e.g. "1 2 3 4" While there are #pages left. Show each page. Cause page switch I/O to occur. Wait 1 second. FOR The FOR statement performs iteration on a statement. FOR expression DO statement expression specifies any expression that yields an integer value.
SeeView Statements and Script Symbols FOR FOR rows DO BEGIN { For each row LINE (row:=row+1)*h+1; { position to line.
FRAMEVIDEO SeeView Statements and Script Symbols FRAMEVIDEO The FRAMEVIDEO statement defines the video attributes for window frames when the ALTER option FRAMEVIDEO is ON. FRAMEVIDEO and FV are synonyms. When the ALTER option FRAMEVIDEO is ON, the SeeView program operates with any 6500 terminal emulator, including those that do not support the T6530 terminal alternate graphics character data set. See the ALTER FRAMEVIDEO option.
SeeView Statements and Script Symbols FRAMEVIDEO MENUHEAD specifies the video attributes for window headings that are associated with menu windows. This portion of the window is referred to as the HEADING in the WINDOW statement. MENUBODY specifies the video attributes for window bodies associated with menu windows. This portion of a window is referred to as the GLASS area of a window in the WINDOW statement. MENUFOOT specifies the video attributes for window footings associated with menu windows.
GOODBYE SeeView Statements and Script Symbols Example 9-1. Sample SeeView Program CALL seecolor; ALTER FRAMEVIDEO ON; FV HEAD ( Reverse FV BODY ( Reverse FV FOOT ( Reverse FV FOOTNOSILL ( ); FV MENUHEAD ( Reverse FV MENUBODY ( Dim ); FV MENUFOOT ( ); FV EDITHEAD ( Reverse FV EDITBODY ( Reverse ESC "dm"; { emulate ); Dim ); Dim ); Dim ); ); Dim Blink ); function key SF14 GOODBYE The GOODBYE statement logs you off from the SeeView program.
SeeView Statements and Script Symbols GRAPH This example results in a syntax error: GOODBYE; PAGE 1; CLEAR; WINDOW; This restriction keeps you from getting into situations in which it could be difficult or impossible to log back on. With the preceding exceptions, commands continue to be performed after the execution of a GOODBYE statement until the end of the current SeeView command stream is reached. • • • Continued execution of statements allows you to define the rules for logoff.
SeeView Statements and Script Symbols GRAPH FILE filename specifies that data in a disk data file containing ASCII or data defined by a data dictionary is to be graphed. TASK taskid specifies that messages from a taskid declared with the TASK statement are to be graphed. For example, use the GRAPH TASK taskid statement as follows: VAR TASK WRITE WRITE WRITE GRAPH count := 50; enform; enform, "Open employee; set @heading off;"; enform, "Set @target-records " & count & ";"; enform, "List employee.
SeeView Statements and Script Symbols GRAPH CACHE index reads graph data from the cache associated with the taskid rather than actually reading from the task in real time. index specifies the beginning ordinal record index in the cache. CACHE indexes 0, 1, 2, ..., correspond to the first, second, third, ..., records in cache, and CACHE indexes -1, -2, -3, ..., correspond to the last, second from last, third from last,..., records in cache.
SeeView Statements and Script Symbols GRAPH HEADING string-exp defines an optional text heading for the graph. You can abbreviate the HEADING option as HEAD. HISTO number selects the type of built-in graphic character to use for the current graph. There are six different built-in graphic characters for a T6530. You can use HISTO values 1 .. 6 to select these different character sets. If you use a value outside the range 1..6, the graphing character set is selected based on modulo 6 of number.
SeeView Statements and Script Symbols GRAPH RIGHT | DOWN | SAME specifies the location of the SeeView screen buffer address after the graph is drawn. RIGHT specifies that the buffer address is positioned just to the right of the graph after it is drawn. DOWN indicates that the buffer address is positioned just below the graph. SAME indicates that the buffer address is at the same position as the graph.
SeeView Statements and Script Symbols GRAPH Wexp specifies an integer expression indicating the width of the graph, such as SIZE 40,12. Valid values for Wexp range from 5..80. Width specifies the number of histogram elements to be graphed. For example, a width of 80 graphs more elements than a width of 5. MAX specifies the maximum allowable width or height possible. MAX is an easy way of making a graph as large as possible. Hexp specifies an integer expression indicating the height of the graph.
HELLO SeeView Statements and Script Symbols This output is from the previous example. HELLO The HELLO statement logs on to SeeView. If the SeeView program is currently in a logged-on state, you can log on with any valid user ID and password.
HELP SeeView Statements and Script Symbols NOP. If password is included in a SeeView script file, tilde characters are used to delimit control characters. Note. Change the accessor ID of the SeeView process only after careful planning. Changing the accessor ID of the SeeView process does not change the accessor ID of the processes with which the SeeView program communicates.
SeeView Statements and Script Symbols HELP ALL lists all of the SeeView statement commands and function keys. It has the same function as pressing F14. NEW [ FEATURES ] provides a summary of new features since the revision date. All new features appear in the HELP NEW FEATURES display.
HISTORY SeeView Statements and Script Symbols NEW USER displays generalized, introductory help for new users when you type HELP NEW USER from a window sill. For example: HISTORY The HISTORY statement displays user command history in the current window. You can scroll through commands backward or forward directly on the window sill where the cursor is located when you enabled the sill scroll option (ALTER SILLSCROLL ON). If it is enabled, function keys F3 and F4 scroll backward and forward one command.
SeeView Statements and Script Symbols If you do not specify taskid, the command history appears for programs associated with the current window. If the window is a free window and no taskid or asterisk (*) is specified, the history is for SeeView commands. COUNT cmds indicates the number of commands to display. The default is one page of commands based on the size of the current window. DETAIL displays the date, time, taskid or program name, and command.
SeeView Statements and Script Symbols IF expression THEN statement executes the statement following THEN if the conditional expression is true or nonzero. Otherwise, the ELSE statement is executed. ELSE statement executes the statement following ELSE. Considerations • • • You can nest IF statements. You can use compound statements. For example, you can use a BEGIN…END statement within an IF statement.
SeeView Statements and Script Symbols Example This example shows a nested IF statement. ?MENU DownDevs ?PROC ShowDown(#DevType) {----------------------} { This proc displays a menu of down devices. { The column number of the down "D" state info { is dynamically determined from the PUP output.
SeeView Statements and Script Symbols INFO INFO The INFO statement displays information about procedures currently in the SeeView procedure library. Procedures are added to the library when a SeeView file or cache is invoked with the INVOKE statement, or when the file defined by the ALTER SHELL command is invoked at startup or by means of the invoke shell function key SF15. INFO [ PROC * | procname ] [ QFILES ] PROC * displays information about all procedures currently in the SeeView procedure library.
SeeView Statements and Script Symbols INVOKE This example shows the INFO PROC * option. INFO PROC * PROCS in $SYSTEM.SYSTEM.SEELOCL = 11 SEETELE @757 SEENEWMENUITEM @715 SEEMAILWHOFROM @640 x2 SEEMAILREPLY @582 SEEMAILFOLDERS @523 x1 SEEMAILCONFMENU @513 SEEMAILCONF @489 SEEMAILMENUOP @343 x21 SEEMAIL @204 x25 SEELOGGERS @161 SEEPROMPTWAIT @105 x1 --> total procs = 82, longest chain = 3 <-- Note. The x25 for the SEEMAIL PROC indicates that this PROC has been called 25 times since the script $SYSTEM.
LEFT SeeView Statements and Script Symbols Example This example shows the INVOKE CACHE statement. TASK DELETE LOAD ALTER INVOKE myshell:=$foo CACHE 100; {declare cache for shell myshell!; {clear cache $system.system.SeeShell, myshell; {load SeeShell to memory SHELL CACHE myshell; {so SF15 invokes memory version CACHE myshell; {invoke shell in memory LEFT The LEFT statement moves the buffer address left, relative to the current buffer address. LEFT and L are synonymous and can be interchanged.
SeeView Statements and Script Symbols LET LET The LET statement assigns an integer variable to the value of an integer expression. LET designational-exp designational-exp specifies the integer variable assignment. The integer variable is followed by a colon and equal sign (:=) and the integer expression that is assigned to the integer variable. Considerations • • Including the LET term in the statement is optional. (See the next example.
SeeView Statements and Script Symbols LINE25 Example This example shows the LINE statement. ?PROC GraphCpus( #cpulist ) {-------------------------} PARM #cpulist; { list of cpu numbers VAR count:=0 { number of CPUs in #cpulist , height { height of graph , cpu { cpu number , L := 1 { logical line number ,#cpus := #cpulist ; WHILE #TRIM #cpus<>"" DO count:=count+1; height := 24/count; DO BEGIN LINE L; cpu := #TRIM #cpulist; GRAPH cpu.
SeeView Statements and Script Symbols LISTDEV LISTDEV The LISTDEV statement puts device names of a specified type in a given cache. Each device name is stored in a separate line of cache. If you do not specify a device type, all device types are stored in the cache.
SeeView Statements and Script Symbols LISTDEV the end of the last line output. The maximum value of count is a 32-bit signed integer. START ldev-num lets you resume the LISTDEV display from the last ldev-num displayed. When used in conjunction with the MORE option, LISTDEV can be called repeatedly to return consecutive sets of logical devices. The maximum value of ldev-num is a 32-bit signed integer.
SeeView Statements and Script Symbols LOAD This example shows a general procedure that can be called repeatedly to return ascending blocks of logical devices in a cache named Ldevs. ?menu Ldevs cache 10 ?proc GetNextDevices(Type,Count,More) {-----------------------------------{ This proc gets next block of logical devices of "Type". { Up to "Count" devices are returned in cache "Ldevs". { If "More" true, call again to get next block of Ldevs.
SeeView Statements and Script Symbols LOCK / UNLOCK cache-taskid specifies the cache, represented by taskid, into which the file is loaded. Considerations a programmatic interface also allows loading, deleting, and displaying of the cache. The interface uses this CONTROLBUF protocol. Table 9-3.
MSG SeeView Statements and Script Symbols Example This example demonstrates the LOCK statement. ?PROC StatusUser {---------------} { Lock keyboard if we must start tacl {------------------------------------} TASK tacl; IF #TASKSTART THEN BEGIN { Let user know what's going on LOCK; { while we wait for tacl prompt. MSG "One moment, starting TACL"; FLUSH; UNLOCK; END WINDOW tacl, "status *,user" CACHE LASTLINE; MSG The MSG statement displays a specified message on line 25 of the terminal.
SeeView Statements and Script Symbols ON ON The ON statement specifies the current shell file and the default subvolume of the disk files accessed by SeeView. ON shell-filename [ ( section-name ) ] shell-filename specifies the name of the file to be used as the current shell file. The volume and subvolume names contained in the shell-filename are used to specify the new default volume.
OPEN SeeView Statements and Script Symbols OPEN The OPEN statement declares a user program taskid and creates a window for it.
SeeView Statements and Script Symbols OPEN startup-string-exp specifies the startup message to be written to the process started by this OPEN statement. BLOCKEDIO ON | OFF indicates whether an interprocess communication message received from taskid can contain multiple logical messages delimited by carriage-return [linefeed] characters.
SeeView Statements and Script Symbols OPEN HIGHPIN ON | OFF specifies whether the process to be created should be a high or low PIN process. ON implies SeeView should attempt to create a high PIN process. OFF implies SeeView should create a low PIN process. Not all processes are capable of running as a high PIN. There is also a global option ALTER HIGHPINTASKS ON | OFF that controls high/low PIN creation for all OPEN, RUN, or TASK statements without having to specify HIGHPIN on each statement.
SeeView Statements and Script Symbols OPEN program communicates with $CMON when it is present and tries to use assignments indicated by $CMON. QUEUE ON | OFF determines whether the SeeView program automatically replies to messages from the specified task. QUEUE ON indicates that the SeeView program will not automatically reply to any messages, including simple writes, from the specified task. QUEUE OFF indicates that the SeeView program will automatically reply to any simple write messages from the task.
PAGE SeeView Statements and Script Symbols Or you can use a string expression: VOL #mysubvol Example This example shows the OPEN statement. OPEN OPEN OPEN OPEN fup; comint; ci:=comint; zoom:=$DATA.X.Y { { { { Same Same Same Same as as as as TASK TASK TASK TASK fup :=fup; comint:=comint; ci :=comint; zoom :=$DATA.X.Y; WINDOW WINDOW WINDOW WINDOW fup comint ci; zoom; PAGE The PAGE statement specifies which terminal page to display and where output from subsequent SeeView statements appears.
SeeView Statements and Script Symbols PAGEMSG PAGEMSG The PAGEMSG statement displays a video-highlighted Page n of m message at the current buffer address or, if after a LINE25 statement, on line 25. PAGEMSG [ expression ] expression displays the message with a page number other than the current page number. Example This example shows the PAGEMSG statement.
PARM SeeView Statements and Script Symbols PARM The PARM statement declares procedure parameter variable names and data types (#string or integer). Use the CALL statement to pass parameters to a procedure (see the CALL statement.) You can pass parameters either by value (IN) or by reference (IO or OUT). PARM variable [ := initialization ] [ IN | IO | OUT [, variable … ] ] variable specifies a procedure parameter variable name. := initialization-exp declares the initial value of the variable.
SeeView Statements and Script Symbols PARM IO and OUT indicates that the variable is a reference parameter. Value assignments within the procedure are returned to the calling variable. The only difference between IO and OUT is that IO documents whether the value passed to the procedure by the caller used by the procedure declaring the parameter. variable specifies additional procedure parameter variable names. Considerations • • • To pass parameters to a procedure, use the CALL statement.
PARM SeeView Statements and Script Symbols { If F16 is pressed then PARM "escape" returns a nonzero value. {----------------------------------------------------------------} PARM #firstName OUT { return first name , #lastName OUT { return last name , #address OUT { return address , #phone OUT { phone number , escape:=0 OUT { <> 0 implies escape.
SeeView Statements and Script Symbols • The second example follows: ?MENU Panelmenu ?PROC Panel(#field1, #p1, #field2, #p2, ..) {-----------------------------------------} { This proc dynamically builds an input panel in cache { based on fields 1, 2, .. passed to it. { { Once the panel is built, then it is displayed, and { a "modal" function key wait for input occurs. { User input is then returned via parms #p1, #p2, .. { { #field1, #field2, .. defines panel data and [ ] input area. { #p1, #p2, #p3, ..
SeeView Statements and Script Symbols PLOT IF #FKEY=16 then return; MSG (r) #name &" "& #addr &" "& #ph; {-----------------------------------------} { Note: Add code here to update a database, { or save person data to a cache. {-----------------------------------------} ?SECT main {---------} { GetPerson data until F16 is pressed. {------------------------------------} MSG "Please enter person data. Escape-F16.
SeeView Statements and Script Symbols POP Example This example demonstrates the PLOT statement. VAR row:=0; PLOT 0,0; FOR 4 DO BEGIN GRAPH TASK comint RECORD ci.priority SIZE MAX,6; PLOT 0, (row:=row+6); END; POP The POP statement removes an element (line of text) from a specified cache. POP #string-var FROM taskid [ TAIL ] #string-var specifies that the popped element is copied to #string-var. FROM taskid specifies the cache from which the element is removed. TAIL removes the last element in the cache.
SeeView Statements and Script Symbols PRINT Example This example shows the PUSH and POP statements.
SeeView Statements and Script Symbols PROMPT PROMPT The PROMPT statement prompts the output file for input when SeeView runs in CImode (server mode 3 or 4). The PROMPT statement allows command interpreter SeeView scripts. See also CI statement. PROMPT [ string-exp ] ,string-var [ ,error ] [ ,timeout ] string-exp specifies the prompt string expression to be written to the output file when the PROMPT statement executes. Any valid string expression is permitted.
SeeView Statements and Script Symbols PUSH where the file $data.test.prompt might contain this script: VAR #p:= "?", #s, err; DO BEGIN PROMPT #p, #s, err; MSG "#s=" & #s & ", err=" & err; END UNTIL err; Example #2 An advanced conversational interface script can be found in the file SEEISHEL, which is distributed with the SeeView product. PUSH The PUSH statement copies a string expression onto the end of the cache associated with a user task.
SeeView Statements and Script Symbols READ Example This example shows the PUSH and POP statements.
SeeView Statements and Script Symbols READ Without this option, the SeeView program waits specifically for a message from only the specified taskid. When you use PEEROK, use the intrinsic #TASKIDLASTREAD to determine the actual taskid of the peer task that caused the READ statement to complete. CACHE index specifies that data is moved from the cache associated with the taskid rather than being read from the task in real time. index specifies the ordinal record index in the cache.
RETURN SeeView Statements and Script Symbols RETURN The RETURN statement causes the SeeView interpreter to stop executing the current section or procedure and returns control to the calling procedure or section. RETURN Considerations • • All procedures and sections contain a logical return after all statements are executed in the procedure or section. When either a logical or explicit return occurs, control returns to calling procedure, section, or menu production.
SeeView Statements and Script Symbols RULER This command draws a box: ### # # ### See also the LEFT, UP, and DOWN statements. Example This example shows how to use the RIGHT statement. RIGHT:(w/2*12) {Moves right w/2*12 character positions RULER The RULER statement draws a ruler. RULER Considerations If you enter the statement from a window, the ruler is drawn relative to the window. Otherwise, the ruler is drawn on the current terminal page.
RUN SeeView Statements and Script Symbols RUN program [ /opt [, opt… ] / ] [ startup-message ] Where opt ::= [ [ [ [ [ [ [ [ [ [ [ [ [ ALLOWERROR CPU cpu-number HIGHPIN ON | OFF IN filename LIB library-fname NAME process-name ONMYVOL ONOBJVOL OUT filename PRIORITY process-priority STARTUP string-exp SWAP swap-fname VOLUME subvol | str-exp ] ] ] ] ] ] ] ] ] ] ] ] ] program specifies the program that the RUN statement starts and to which it passes terminal control.
SeeView Statements and Script Symbols RUN ALLOWERROR allows the SeeView interpreter to continue execution without reporting new process errors that occur due to the task declaration. You can use the #TASKERRORTYPE, #TASKERROR, #TASKPROC, and #TASKSTART intrinsics with this option to provide programmatic recovery from TASK declaration errors. The #TASKERROR and #TASKERRORTYPE values returned are a function of the procedure used in the attempt to start the process.
SeeView Statements and Script Symbols RUN IN filename specifies the input file. LIB library-fname specifies an external user library file of object routines. If specified, this library file is used to resolve external references in the program being run. NAME process-name specifies the symbolic name assigned to the newly created process. ONMYVOL indicates that the program object file name specified in the RUN program is expected to exist on the current default SeeView volume and subvolume.
SAVE SeeView Statements and Script Symbols Or you can use a string expression such as: VOL #mysubvol Example This example shows various methods for using the RUN statement. RUN pathcom/STARTUP "$mypm; run program myprog"/ RUN pathcom $mypm;run program myproc RUN tedit myfile { ok anywhere { ok from sill or menu SAVE The SAVE statement saves data associated with a task’s cache memory.
SCAN SeeView Statements and Script Symbols Considerations If you use the window editor to load a file into a window through the Seedit GET command, that window contains a copy of the file. When you enable edit mode, the window heading includes the file name of the file copied into that window. When you enter SAVE with no file name and without the [!] option, you replace or purge the original file with the modified cache copy of the file to be saved.
SEARCH SeeView Statements and Script Symbols follow the scan-string with an index range to be scanned for. Thus SCAN #s[ i : j ] limits the scan to characters “i” through “j”. UNTIL target-string specifies that the scan of the scan-string continues until the string expression represented by target-string is found. You can use a multiple character target for the target string.
SeeView Statements and Script Symbols SEARCH CACHE specifies that the cache search target follows: [ + | - ] specifies whether the search is forward + (top-down and left-to-right search), or backward - (bottom-up and right-to-left). + is the default search direction. target specifies the search target string.
SeeView Statements and Script Symbols SEARCH STARTING -1, -2, -3, ..., corresponds to the last, second from last, or third from last line in cache. STARTING column values are one relative. When a column points exactly to a target in cache, the next target is found. If you do not specify a STARTING option, the default is STARTING 0,0. Examples This example shows the SEARCH statement.
SEARCH SeeView Statements and Script Symbols ?MENU ChangeWhat {---------------} Cache name [ Target text[ New Text [ ] ] ] ?PROC Change {-----------} { Accept "ChangeWhat" panel and pass request to ChangeCache proc {---------------------------------------------------------------} LINE #MENULINE,#MENUCOL; { Position to calling panel VARIABLE #Cache, #Target, #NewText; { Declare variables ACCEPT #Cache, #Target, #NewText; { Accept panel data.
SeeView Statements and Script Symbols SECURE SECURE The SECURE statement restricts usage of SeeView statements and function keys. The restriction can apply to either the interactive user level only or to both the interactive and scripting level. SECURE [ DENY ] [ SILL | ANY ] { stmt | fkey } [ ENABLE ] [ SILL | ANY ] { stmt | fkey | * } DENY indicates that the specified statement stmt or function-key fkey primitive cannot be used. DENY is the default.
SETPAGE SeeView Statements and Script Symbols Considerations Use the SECURE statement to restrict access to internal SeeView objects (statements and functions keys). To restrict access to external objects, such as programs or files, use the Safeguard command interpreter SAFECOM. You can define Safeguard access-control lists (ACLs) for external SeeView menu items and tasks because these items are HP NonStop files. Example These examples show the SECURE statement.
SHUTDOWN SeeView Statements and Script Symbols expression specifies a terminal page other than the one to which host data input and output is currently directed. You cannot use values less than one. Example This example shows the SHOWPAGE statement. VAR pg:=0; FOR 6 DO BEGIN SHOWPAGE (pg:=pg+1); WAIT 2; END; {Display each page for 2 seconds SHUTDOWN The SHUTDOWN statement stops the SeeView program and all associated userdefined tasks.
SeeView Statements and Script Symbols STATUS Example This example shows the SHUTDOWN statement. ?MENU MyMenu ?PROC ShutDown {-------------} { A proc to shutdown SeeView. Note, if any windows are in editmode, { then a menu is popped up displaying the open windows else shutdown. {--------------------------------------------------------------------} VAR taskno := -1 {Will iterate thru valid taskids ,editpg ; DELETE mymenu!; {To contain list of editmode windows.
SeeView Statements and Script Symbols STOP Example A sample status display follows: Taskid Cpu,Pin Name CachePg Timeout Seeview - T6965D40 - (02FEB95) ---------- ------- ------ -------- ------- -----------------------------SEEMENUS menudata 17/20 60,15 $SYSTEM.SYSTEM.SEESHELL TACL ~ 1,124 $Z283 1/11 60,15 $SYSTEM.SYSTEM.TACL PUP ~ 1,140 $Z282 0/11 60,15 $SYSTEM.SYSTEM.PUP PSMAIL T ~ 2,139 $Y444 12/15 60,15 \CHICAGO.$SYSTEM.SYSTEM.PSMAIL TELE ~ 3,138 $Y445 7/15 60,15 \CHICAGO.$SYSTEM.SYSTEM.
SeeView Statements and Script Symbols STOP continues to exist. The STOP statement stops only the process associated with the designated taskid. The STOP statement does not terminate the existence of the actual declared taskid, alter any of its attributes, or affect any windows that are referencing the taskid. \ node specifies the system node name where the process to be stopped exists. $name specifies the process name of the process to be stopped.
SeeView Statements and Script Symbols TASK TASK The TASK statement declares a taskid name to be associated with a program on a NonStop system. After you declare a TASK, you can communicate with it through various SeeView statements. The scope of the declared taskid is global, and you can reference it from any menu, section, or procedure.
SeeView Statements and Script Symbols TASK object-name specifies either an object file on disk or a process ID. Processes not declared by the SeeView program can gain access through a taskid socket by opening the SeeView program with: $SeeView-process-name.#taskid, for example, $See.#Socket. When object-name is a program object file name, that process is started with its IN and OUT files assigned to the SeeView process ID.
SeeView Statements and Script Symbols TASK END; END; IF #TASKPROC = "NEWPROCESS" THEN BEGIN IF #TASKERRORTYPE=3 AND #TASKERROR=11 THEN BEGIN MSG "File not present"; END; END; BLOCKEDIO ON | OFF indicates whether an interprocess communication message received from taskid can contain multiple logical messages delimited by carriage-return [linefeed] characters.
TASK SeeView Statements and Script Symbols DEVTYPE PROCESS | TERMINAL specifies the type of device that the SeeView program is to emulate for the declared task. Certain utilities, such as FUP, SPOOLCOM, and TACL, behave differently if they perceive themselves to be communicating with a PROCESS versus a TERMINAL. This option lets you specify the device type that the SeeView program returns to DEVICEINFO calls.
SeeView Statements and Script Symbols TASK HIGHPIN ON | OFF specifies whether the process to be created should be a high or low PIN process. ON implies SeeView should attempt to create a high PIN process. OFF implies SeeView should create a low pin process. Not all processes are capable of running as a high PIN. There is also a global option ALTER HIGHPINTASKS ON | OFF that controls high/low PIN creation for all OPEN, RUN, or TASK statements without having to specify HIGHPIN on each statement.
SeeView Statements and Script Symbols TASK PRIORITY process-priority specifies the execution priority of the new process. PRIORITY takes effect only when you are creating the program associated with the taskid. The SeeView program communicates with $CMON when it is present and tries to use assignments indicated by $CMON. QUEUE ON | OFF determines whether the SeeView program automatically replies to messages from the specified task.
SeeView Statements and Script Symbols TASK end indicates the ending character index in each cache element where sort comparisons between cache elements are to occur. A valid end value is from 1 through 132, where end is greater than or equal to start. For example, SORTED[10:19] sorts records based on the contents of character positions 10 through 19 of each cache record. STARTUP string-exp specifies the startup message to be sent to the newly created process.
SeeView Statements and Script Symbols TASK This mechanism allows you to use $CMON to define the rules for process creation. For example, you can use PROCESSINFO calls to count the number of processes a given SeeView program has running, or to assign the CPU and execution priority of a given task. • NonStop Openers: Tasks that run NonStop should open the SeeView program when their backup process takes over rather than use paired OPEN operations via CHECKOPEN prior to takeover.
TRANSLATE SeeView Statements and Script Symbols TRANSLATE The TRANSLATE statement defines how characters are translated when the ALTER CACHEFILTER ON option is enabled. TRANSLATE [ INITIALIZE ] char [..char ] TO char [..char ] INITIALIZE initializes the translate table so that all non-visible control characters are translated to spaces. This is the default value of the translate table. It is equivalent to: TRANSLATE 0 .. 31 TRANSLATE 14 TRANSLATE 15 TRANSLATE 27 TO " "; { translate null ..
VARIABLE SeeView Statements and Script Symbols char specifies a single character that you can use to smear expression times in the indicated direction. Smear means to use the specified char to mark all locations moved through by the move operation. For example: RIGHT:3:# DOWN:3:# LEFT:3:# UP:3:# This command draws a box: ### # # ### See also the DOWN, LEFT, and RIGHT statements. Example This example shows the UP statement. U:i:# {Moves the current value of variable i smearing "#".
VIDEO SeeView Statements and Script Symbols You can initialize string variables to either a string or integer value. You must initialize integer variables to an integer value. String variables declared with no initialization-exp have an initial value equal to the null string “”. Integer variables declared with no initializationexp have an initial value equal to minus one (-1). Example This example shows the VARIABLE statement using multiple variables.
SeeView Statements and Script Symbols WAIT UNDERLINE specifies the underline video attribute for the screen area starting at the current buffer address. video-exp specifies an integer expression surrounded by left and right square brackets that indicates the bit-wise T6500 terminal video attributes. You can use the [video-exp] in place of attribute keywords enclosed in parentheses. For example, VIDEO [4+1] is equivalent to VIDEO (REVERSE DIM).
SeeView Statements and Script Symbols WAIT expression-seconds specifies an integer expression that indicates the number of seconds to suspend the interpreter. REFRESH indicates that all windows on the current page are automatically updated in real time during the wait interval. Considerations • • • Pressing the BREAK key terminates the WAIT period and the compilation sequence.
SeeView Statements and Script Symbols WHILE ?PROC Monitor ( #nodelist, #logname ) {-----------------------------------} { Build log monitor windows on nodes in #nodelist. { #Nodelist contains sys names without backslashes. {-------------------------------------------------} PARM #nodelist { list of system names ,#logname := "$system.system.
SeeView Statements and Script Symbols DO statement specifies any valid SeeView statement, including a compound statement. Considerations You can use a BEGIN term, followed by multiple statements and an END term, to delimit compound statements for execution. You can use nested statements. Example This example shows how to use the WHILE statement.
SeeView Statements and Script Symbols WINDOW WINDOW The WINDOW statement builds a window or menu at the current screen buffer address. You specify the address for the window with the BELOW, BESIDE, LINE, PLOT, LEFT, RIGHT, UP, or DOWN statements. You specify the size of the window with the SIZE option. (See the SIZE option on page 9-129.) Default window frame attributes are GLASS, OPEN, and SILL. GLASS protects the window text area unless it is edit mode.
SeeView Statements and Script Symbols WINDOW WINDOW statements that do not specifically reference a taskid, thus promoting generalized programming techniques that do not depend on specific taskids. This specification also allows an external program to dynamically generate SeeView menu productions and associated window statements in its output text so that this text can be used as a self-referential menu, without the need to know the taskid of this menu.
SeeView Statements and Script Symbols WINDOW INDEX index displays cache messages beginning with the cache line indicated by the index expression. index specifies the ordinal record index in the cache. Indexes 0, 1, 2, …, correspond to the first, second, third,... records in cache, and indexes -1, 2, -3,. …, correspond to the last, second from last, third from last,..., records in cache. [ + | - ] target displays cache messages beginning with the target text specified.
SeeView Statements and Script Symbols WINDOW EDIT specifies that a window is created in edit mode. When you create a window with the EDIT option, the window has edit mode enabled. You can edit the text appearing within an EDIT window immediately. To disable an edit-mode window, place the cursor on its sill, type either Save (S) or Escape (E), and press the Enter key. NOEDIT specifies that a window is created in normal mode, not in edit mode. NOEDIT is the default.
WINDOW SeeView Statements and Script Symbols Field video attributes are: DIM BLINK REVERSE BLANK UNDERLINE NORMAL | D | B | R Field Field Field Field | U Field | NORM Field is is is is is is dimmed. blinking. reversed. invisible. underlined. normal video. [ 1, [ 2, [ 4, [ 8, [16, [ 0, Field domain attributes are: FREE ALPHA ALPHASP ALPHANUM ALPHANUMSP NUMERIC NUMFULL NUMFULLSP NOTAB PROTECTED | | | | | | | | | | F A AS AN ANS N NF NFS NOT P Field is any characters.
SeeView Statements and Script Symbols WINDOW For example: ?MENU Employee {-------------} { The following defines an Employee panel.
SeeView Statements and Script Symbols WINDOW * specifies the height of the window to be as tall as possible and the width to be the value of #MENUWIDTH. FRAME draws the window frame (default). NOFRAME suppresses the redrawing of the frame and heading if there is already a window at the current location with the same size and window attributes. This is especially useful in menu productions to provide very fast I/O-efficient popup displays in a window.
SeeView Statements and Script Symbols WINDOW The #MENU... intrinsics return information about the attributes of the window that invoked the script even if that window was not a menu. For example, the following example associates the function keys F6 and F9 with user-defined script operations, Delete and Print. In all other respects, the psmail window is a normal window.
WINDOW SeeView Statements and Script Symbols OFF indicates that the window should have no function keys enabled for it. To globally specify the KEYS option, use the ALTER KEYS option. MENU [ default-production ] [ , shift-production ] indicates that the window is a menu. A window declared to be a menu defaults to NOGLASS, NOSILL, PROTECT, NOPAGES and has a heavy- or double-line frame.
SeeView Statements and Script Symbols WINDOW OFFSET X-offset-exp, Y-offset-exp offsets the window cache viewing area once the initial cache display position is established. You can use the CACHE option to establish the initial cache display position and the OFFSET option to positively or negatively skew this initial position. You can use a negative Y-offset-exp to perform centering.
WINDOW SeeView Statements and Script Symbols shift-production specifies a string expression containing SeeView statements that are executed when you select a window by pointing the cursor to the window and pressing Shift-Return. Shift-Return causes the shift production to be executed. If the Shift-Return key is to invoke the shift production of a nonmenu window, you must include the key in the KEYS option specification. For example: KEYS BODY SRETURN, F5, F6;.
SeeView Statements and Script Symbols WINDOW width-exp specifies an integer expression that indicates the width in characters of the window. The width specification includes the left and right character positions that make up the window frame. A window with a width of three can display one character per line. Three is the minimum allowable value. height-exp specifies an integer expression that indicates the height in characters of the window. The height includes the head and foot portions of the window.
WINDOW SeeView Statements and Script Symbols Examples An example of the WINDOW statement follows.
SeeView Statements and Script Symbols This example displays the window following it. WINDOW fup,"INFO *" CACHE LASTLINE SIZE w,h; This example displays the window following it. WINDOW fup CACHE FIRSTPAGE SIZE w,h; This example displays the window following it. WINDOW fup MENU CACHE /INFO */ OFFSET 0,3 SIZE w,h; This example displays the window following it.
WITH SeeView Statements and Script Symbols WITH The WITH statement indicates which taskid’s attributes are returned through the #TASK... intrinsics. WITH taskid-exp taskid-exp specifies an integer expression representing a taskid number whose task attributes are returned for all subsequent #TASK... intrinsic references. Considerations For a complete explanation of each #TASK... intrinsic, see the string intrinsic definitions in Pound Sign # on page 9-144. Examples These examples show the WITH statement.
WRITE SeeView Statements and Script Symbols WRITE The WRITE statement writes the specified string to a process or a cache. WRITE taskid|* [PEEROK ] ,string [CACHE index [AFTER ]] [BEFORE] [DELETE] [UPDATE] [,reply-err ] [,error ] [FROM task | * ] [CACHE index ] [FOR lines ] [DELIMIT string ] [COMPRESS ] [LINESENT var ] [MAXBYTES cnt ] [MORE string ] taskid specifies an integer expression that represents the taskid number of the task that string is to be written to.
SeeView Statements and Script Symbols WRITE reply-err specifies an integer expression that indicates an optional reply-error value. For example, this WRITE statement returns an EOF error to the FUP taskid: WRITE fup, "", 1; error specifies that the result of the WRITE statement is programmatically determined by setting an integer variable to one of these values: 0 if data was written without an error. 40 if a write timeout occurred; process never prompted. (See the TIMEOUT option of the TASK statement.
SeeView Statements and Script Symbols WRITE UPDATE indicates that the data defined by string is stored in the cache element defined by the CACHE index. In other words, it updates the defined CACHE index. FROM task | * indicates which cache to write from. If you specify FROM, data from the cache associated with the specified task is written to the write taskid. FROM indicates that the WRITE statement string should have up to 32000 bytes of data from the specified cache appended to it.
WRITE SeeView Statements and Script Symbols LINESENT var indicates that the symbolic variable represented by var should be set to the value of the number of lines actually sent. This indicates the number of lines actually written from cache. This provides a mechanism for sending multiple blocks of data from a large cache. MAXBYTES cnt indicates the maximum total bytes that can be written from the FROM cache. The default is 8192. You can increase or decrease the size.
WRITE SeeView Statements and Script Symbols This statement returns data from that cache index: WRITE gui, "TACL status (complete buffer)" FROM tacl CACHE 98 MORE "TACL status (continue ######)"; Considerations The FROM option in conjunction with the PARAM SERVERMODE option allows workstation clients to make ServerClassSend requests to a SeeView gateway server and in return receive large, efficiently blocked responses from virtually any HP conversational process that the SeeView server has been scripted t
WRITEREAD SeeView Statements and Script Symbols • Third example: ?PROC GuiServer ( #op, gui) {-------------------------} { This proc performs the operation contained in { #op and replys the entire response to the requestor.
Parentheses ( ) SeeView Statements and Script Symbols When you specify this option, the WRITEREAD operation is not retried by the SeeView program if an error occurs, and the file-system error is returned in the specified error variable. If you do not specify error-var, the operation is under the control of standard SeeView I/O recovery. Considerations This command is for advanced scripting purposes. Example This example shows the WRITEREAD statement.
Brackets [ ] SeeView Statements and Script Symbols Operator type and precedence are as follows: := 0 (boolean) AND OR NOT 1 1 2 (relational) > < >= <= <> = 2 2 2 2 2 2 (arithmetic) + - * / MOD 3 3 4 4 4 (shift) >> << 5 5 Example This example shows how to use parentheses to specify operator type and precedence.
Quotation Mark “ SeeView Statements and Script Symbols Example This example shows how to use the left brace to delimit an end of the line comment. VARIABLE esc:=27; [esc,"o","This text on line25",esc/2]; {note esc/2=13 which is a Quotation Mark “ A statement beginning with a quotation mark indicates the beginning of a string of data to be written directly to the terminal device defined by the SeeView program output file.
SeeView Statements and Script Symbols Example This example shows how to use quotation mark script symbols.
SeeView Statements and Script Symbols Pound Sign # Pound Sign # The pound sign or octomorph can either mark the beginning of a string-assignment statement or delimit a string variable (string-var), string intrinsic, or string operator.
Pound Sign # SeeView Statements and Script Symbols #FIRMID #FKEY #FKEYCOL #FKEYDELETELINE #FKEYINSERTLINE #FKEYLINE #FKEYNEXTPAGE #FKEYPREVPAGE #FKEYRETURN #FKEYROLLDOWN #FKEYROLLUP #FKEYSNEXTPAGE #FKEYSPREVPAGE #FKEYSRETURN #FKEYSROLLDOWN #FKEYSROLLUP #FVBODY #FVMENUBODY #LASTPAGE #MENUCACHEFILE #MENUCACHELINE #MENUCACHELINEPTR #MENUCOL #MENUEDITMODE #MENUHEADING #MENUHEIGHT #MENUINPUT #MENULINE #MENUOBJECT #MENUPRODUCTION #MENUPRODUCTION2 #MENUTASKID #MENUTEXT #MENUTOKEN #MENUTOKENINDEX #MENUWIDTH #MYPR
Pound Sign # SeeView Statements and Script Symbols #TASKCOL #TASKCOUNT #TASKCPU #TASKDATA #TASKEDITMODE #TASKERROR #TASKERRORTYPE #TASKHEIGHT #TASKID #TASKIDLASTREAD #TASKLINE #TASKMENU #TASKMINUTES #TASKMSGSLASTREAD #TASKOBJECTNAME #TASKPAGENO #TASKPEERS #TASKPID #TASKPIN #TASKPROC #TASKPROMPT #TASKPROMPTING #TASKSECONDS #TASKSTART #TASKSTOPPED #TASKSYMBOL #TASKTIMESTAMP #TASKUSERID #TASKUSERNAME #TASKWIDTH #TERMFILENAME #TERMFILENAMEOLD #TERMID #TIME #TIMEMINUTES #TIMERCPUMS #TIMERCPUSECS #TIMERMS #TIME
SeeView Statements and Script Symbols Pound Sign # #string-variable indicates the beginning of a string-replacement statement when it appears as the first character of a SeeView statement. For example: #S := "assigns this string to string variable #S". The pound sign is a string-type enforcer, signifying that a string variable, string intrinsic, or string operation follows the pound sign.
String Operators and String Intrinsics SeeView Statements and Script Symbols Example This example shows how to use the pound sign script symbol.
String Operators SeeView Statements and Script Symbols #DEVICEINFO #string-var [ index-range ] returns device information for the device named in #string-var. The fileerror, devtype, subtype, rec-length are returned as displayed in the next example. In the following example, the file-error is 0, the devtype is 6, the subtype is 4, and the rec-length is 80. VAR #s : = "$TERM"; MSG #DEVICEINFO #s; {displays 0 6 4 80 You can also use the operator to validate a file name. VAR #s : = "$DATA.SUBVOL.
SeeView Statements and Script Symbols String Operators #NUMERIC #string-var [ index-range ] returns 1 if the first character of #string-var is 0 … 9. #ORD #string-var [ index-range ] returns the ordinal decimal value of the first byte contained in the specified #string-var. VAR #s : ="A"; MSG #ORD #s; {displays 65 #PROC #string-var [ index-range ] returns the name of the file or cache where the procedure name contained in #string-var exists. VAR #s:="SEEPROMPT"; MSG #PROC #s; { displays $SYSTEM.SYSTEM.
String Intrinsics SeeView Statements and Script Symbols #TRIM #string-var specifies #TAKE and #DROP for the first token in #string-var. In this example, #TRIM returns the first token in the string variable #s and removes that token from the contents of the string variable.
SeeView Statements and Script Symbols String Intrinsics One use of this intrinsic is to determine the creator security group and user ID numbers for authentication purposes. For example: Var #GrpNo := #CREATORUSERID[1:3]; Var #UsrNo := #CREATORUSERID[5:7]; if #GrpNo = 255 THEN MSG "SeeView Created by SUPER group" #CREATORUSERNAME returns a string containing the security group and user name of the SeeView creator access ID. Values are returned in GroupName.
SeeView Statements and Script Symbols String Intrinsics Nonnumeric function keys correspond to values of 33 to 47. You can test nonnumeric function keys such as Roll-Up, Roll-Down, and Return, with FKEY... intrinsics, such as #FKEYROLLUP, #FKEYROLLDOWN, and #FKEYRETURN. #FKEYCOL returns the column number of the cursor when a function key (for example, #FKEY or #FKEYRETURN) was last pressed. The value of #FKEYCOL ranges from 1 through 80.
SeeView Statements and Script Symbols String Intrinsics #FKEYPREVPAGE returns a unique nonzero numeric value (36) if the last function key pressed was the Prev-Page key. If the last function key pressed was not this key, the value returned is zero. (This lets you use the intrinsic as a Boolean.) #FKEYRETURN returns a unique nonzero numeric value (39) if the last function key pressed was the Return key. If the last function key pressed was not this key, the value returned is zero.
String Intrinsics SeeView Statements and Script Symbols #FKEYSROLLUP returns a unique nonzero numeric value (41) if the last function key pressed was the Shift-Roll-Up key. If the last function key pressed was not this key, the value returned is zero. (This lets you use the intrinsic as a Boolean.) #FVBODY returns the numeric value of the video attributes for the body portion of all windows in the current SeeView environment. The VIDEO statement accepts a numeric specification for video attributes.
SeeView Statements and Script Symbols String Intrinsics You can use this intrinsic to save the contents of a cache to the file from which it was loaded. For example: SAVE #MENUCACHEFILE !, #MENUTASKID; #MENUCACHELINE returns the ordinal cache record number (from 0 to n) of the first line of text appearing in the window that invoked this script. You invoke a script with Return, Shift-Return, or any of the function keys in the WINDOW statement KEYS fkeylist.
SeeView Statements and Script Symbols String Intrinsics To specify the screen location beside the current menu: LINE #MENULINE, #MENUCOL + #MENUWIDTH; Developers use this construct frequently. A statement called BESIDE is equivalent to this LINE statement. #MENUEDITMODE returns 1 if the invoking window is in edit mode. Otherwise it returns 0. This intrinsic helps you determine whether the invoking window is in edit mode so that the script can possibly provide additional editing operations.
String Intrinsics SeeView Statements and Script Symbols You can use this intrinsic to obtain user input in response to a prompt production input field.
SeeView Statements and Script Symbols String Intrinsics the WINDOW statement KEYS fkey-list. Screen line numbers range from 1 through 24. You can use this intrinsic to calculate screen locations relative to the most recently referenced window or, for example, to redisplay the window at the same location as the current window.
SeeView Statements and Script Symbols String Intrinsics One way you can use this intrinsic is to reassert the same shift production when repainting the current window. For example: WINDOW #MENUTASKID MENU #MENUPRODUCTION, #MENUPRODUCTION2 SIZE #MENUWIDHT,#MENUHEIGHT; #MENUTASKID returns the taskid number of the window that invoked this script. You invoke a script with Return, Shift-Return, or any of the function keys in the WINDOW statement KEYS fkey-list.
SeeView Statements and Script Symbols String Intrinsics This intrinsic is often used to pass information contained in the selected line of window text to a procedure associated with the window.
SeeView Statements and Script Symbols String Intrinsics #MYPROCESSNAME returns a string containing the process name of the current SeeView process. You can use this intrinsic to pass the SeeView process name to another process so that the other process opens the SeeView program.
SeeView Statements and Script Symbols String Intrinsics You can use this intrinsic is to display each terminal page in the current environment that has one or more windows on it. For example: ?proc ShowPages {--------------} { Flip to next used page every 3 seconds.
SeeView Statements and Script Symbols String Intrinsics You can use this intrinsic to programmatically reshell the current shell. For example: EXECUTE "INVOKE " & #SHELL; #SPACES returns a string containing all space characters “ ”. You typically use this as a way to generate a variable number of spaces.
String Intrinsics SeeView Statements and Script Symbols #TASKCACHELINE returns a numeric value representing the ordinal record number in cache of the first cache line appearing in a window on the current WITH taskid. The WITH statement indicates which taskid’s attributes are returned by the #TASK... intrinsics. You can use this intrinsic to determine where in cache a window is currently positioned and to scroll the text relative to this position.
SeeView Statements and Script Symbols String Intrinsics You can use this intrinsic to determine whether the cache associated with the current WITH taskid is large enough to contain certain information. For example: WITH mydata; IF #TASKCACHEPAGES < PagesNeeded THEN MSG "Not enough room to load data" ELSE BEGIN DELETE mydata!; LOAD $vol.subvol.data , mydata; END; #TASKCOL returns a numeric value representing the screen column number of the left edge of a window on the current WITH taskid.
SeeView Statements and Script Symbols String Intrinsics taskid. For example the following displays TACL status for all processes running in the same CPU as the current WITH taskid. TASK FUP; TASK TACL; WITH FUP; WINDOW TACL,"STATUS " & #TASKCPU; #TASKDATA returns a string containing the last data received from the current WITH taskid. The WITH statement indicates which task ID’s attributes are returned by the #TASK... intrinsics.
SeeView Statements and Script Symbols String Intrinsics If NEWPROCESS was used in the last TASK statement, the value of the #TASKERROR intrinsic is the value of bits <8:15> of the ERROR parameter returned by the Guardian procedure call NEWPROCESS. If PROCESS_CREATE_ was used in the last TASK statement, the value of the #TASKERROR intrinsic is the value of the ERROR^DETAIL parameter returned by the Guardian procedure call PROCESS_CREATE_. This intrinsic does not require a WITH statement to have meaning.
String Intrinsics SeeView Statements and Script Symbols #TASKERROR depend on which procedure was used to launch the process. For info on error codes returned, see the GUARDIAN Procedure Calls PROCESS_CREATE_ and NEWPROCESS. You use the #TASKERRORTYPE intrinsic to programmatically determine if a TASK statement executed successfully. For example: VAR #program := "$SYSTEM.SYSTEM.
SeeView Statements and Script Symbols String Intrinsics #TASKLINE returns a numeric value representing the screen line number of the top edge of a window on the current WITH taskid. Screen line numbers range from 1 through 24. The WITH statement indicates which taskid’s attributes are returned by the #TASK... intrinsics. You can use this intrinsic to determine where a window is located for a given taskid. For an example, see #TASKCACHELINE on page 9-165.
SeeView Statements and Script Symbols String Intrinsics In this example, messages are processed in FIFO order as they were received in the last I/O block read. VAR #s, i; TASK request:=$OPS BLOCKEDIO ON; TASK TACL; DO BEGIN READ request,#s; WITH request; i :=#TASKMSGSLASTREAD; FOR #TASKMSGSLASTREAD DO BEGIN READ request cache -(i),#s; WRITE TACL,#s; i:=i-1; END; END UNTIL 1; #TASKOBJECTNAME returns a string containing the file name of the current WITH taskid.
SeeView Statements and Script Symbols String Intrinsics #TASKPID returns a string containing the process ID of the current WITH taskid. The WITH taskid indicates which taskid’s attributes are returned by the #TASK... intrinsics. You can use this intrinsic to pass the process ID of the current WITH taskid to another process. #TASKPIN returns a string containing the process identification number (PIN) of the current WITH taskid. The WITH taskid indicates which task ID's attributes are returned by the #TASK.
SeeView Statements and Script Symbols String Intrinsics You can use this intrinsic is to check the current WITH taskid prompt text in order to determine the state of the task. For example: TASK fup; WITH fup; DO BEGIN { Wait until task is prompting, then test prompt. READ fup; END UNTIL #TASKPROMPTING; IF (#TAKE #TASKPROMPT <> "-") THEN BEGIN MSG "FUP is in an unknown state.
SeeView Statements and Script Symbols String Intrinsics You can use this statement to initialize a task that has just been started or to advise users that a task has been started. For example: ?PROC StartTacl ( TaclPage ) {--------------------------} { Perform TACL startup. { { If TACL not previously running, { advise user, initialize by obeying MyInit, and show TACL window.
SeeView Statements and Script Symbols String Intrinsics You can use this intrinsic to display the name of a task when generalized WITH taskid logic is used. For example: ?PROC DoTaskCommand ( tasknum , #command ) {----------------------------------------} { This proc performs #command against tasknum. {--------------------------------------------} PARM tasknum, #command; WITH tasknum; IF #TASKSTOPPED THEN BEGIN MSG "Please wait, " & #TASKSYMBOL & " is not running.
SeeView Statements and Script Symbols String Intrinsics This example shows how this intrinsic might be used to determine the security group or user name associated with a TASK variable: WITH FUP; Var #GrpName:=#TAKE #TASKUSERNAME; Var #UsrName:=#TAKE #TASKUSERNAME[#SIZE #GrpName+2:132]; IF #GrpName = "SUPER" THEN MSG "FUP accessorid is in SUPER group"; #TASKWIDTH returns a numeric value representing the width of a window on the current WITH taskid.
String Intrinsics SeeView Statements and Script Symbols This intrinsic is often used when terminal dependent scripts are being written; for example, COLOR for the T6540 PC emulator program. For example: IF (#termid="T6540") and (#firmid>="C") THEN BEGIN CALL SeeColor ("SHOW"); END; { { { { Device is a PC running PCT, and Firmware level is C or higher. Device can handle color. Call proc to display colors.
SeeView Statements and Script Symbols String Intrinsics #TIMEMINUTES returns a string containing the current time of day in minutes since midnight. You can use this intrinsic to determine the elapsed time in minutes between two time samples. For example: VAR #LastTime, #ElapsedMinutes; #LastTime := #TIMEMINUTES; ... #ElapsedMinutes := #TIMEMINUTES - #LastTime; IF #ElapsedMinutes<0 THEN MSG "Date Changed"; #TIMETENSECONDS returns a string containing the current time of day in decaseconds since midnight.
SeeView Statements and Script Symbols String Intrinsics letter representing the general release version, and nn is a number representing the specific release level, for example, D10 or D20. This example returns: “Seeview T6965D20 (01MAR97)”. MSG #PRODNAME & " " & #PRODNUM & #VERSION & " " & #REVISION; #VERSIONIPM returns a string containing the software product revision (SPR) of the current SeeView process.
String Intrinsics SeeView Statements and Script Symbols For example, this example loads the standard SeeShell associated with the SeeView program into a cache named SHELL and invokes a copy of that shell in cache. VAR #SeeShell := #VOLSUBOBJECT & ".
A Running the SeeView Program Installation To install the SeeView program on the system, use the OBEY file named INSTALL, which is included in the SeeView distribution subvolume. Once you complete the installation, the SeeView program is ready for use. The SeeView product consists of the following files: SEEVIEW The SeeView program. SEESHELL Standard SeeView menus and procedures. SEEDIT The SeeView text editing and utility program.
Startup Values Running the SeeView Program option specifies any standard TACL run option. For a description of the standard TACL run options, see the TACL Reference Manual. statement specifies one or more SeeView statements described in Section 9, SeeView Statements and Script Symbols. Startup Values The SeeView program has several default settings that you can change before SeeView startup. Enter the statements at the TACL prompt before starting the SeeView program.
Startup Values Running the SeeView Program • • • • • • PARAM HISTORY history-pages: This parameter sets how many pages of command history the SeeView program stores. The default is three pages. This history pool is shared by all tasks, not assigned to each individual task, and is taken from the cache pool whose size is set by the preceding parameter. PARAM LASTPAGE last-userpage: This parameter specifies how many terminal pages you want the SeeView program to use as user pages.
PARAMs in Startup Message Running the SeeView Program limits value is the total number of declarable tasks and menus. The default is 128 maximum tasks. • ASSIGN CACHEFILE disc-volume: This parameter redefines the disk swap volume for cache memory allocation. PARAMs in Startup Message You can specify SeeView PARAMs in the startup message if PARAM is the first keyword in the startup message and is followed by a comma-separated list of startup PARAM identifiers.
Environment Switch Mode Running the SeeView Program Environment Switch Mode If the startup command includes an ON filename statement (see Section 9, SeeView Statements and Script Symbols), the SeeView program executes the commands contained in the specified file. The ON statement also sets the SeeView default volume and subvolume to the volume and subvolume of filename. An ON statement in the startup command overrides either the SeeShell or the input file command file.
Interactive Mode Running the SeeView Program HP NonStop SeeView Manual—526355-004 A- 6
B SeeView Function Key Reference 6500-Series Terminal Function Keys Table B-1 shows the function key operations for the 6500-series terminals. Table B-1.
PC Terminal Function Keys SeeView Function Key Reference PC Terminal Function Keys Table B-2 shows the function key operations for the SeeView program running on a PC with the PC6530 emulator. Table B-2.
SeeView Function Key Reference Detailed Function Key Reference Detailed Function Key Reference This subsection defines each function key in detail. F1 Displays the previous terminal user page. Terminal user pages are numbered from 1 to lastpage, where the last page is 7, 8, or 13, depending on terminal type. Function keys F1 (previous), F2 (next), SF1 (first), and SF2 (last) control which terminal page is displayed. When you are on page one, F1 displays the last user page.
SeeView Function Key Reference F4 F4 Scrolls forward one command, or scrolls up window text. The operation of this function key depends on the cursor location. If the cursor is on the sill of a window, F4 displays the command history for this window. Each time you press F4, the next command in the command history appears. If the cursor is within the window, F4 rolls the text within the window up 1/3 the height of the window.
SeeView Function Key Reference F6 F6 Deletes current line or enables the editor. If the cursor is on the sill of a window, F6 enables the window editor. If the cursor is within a window and you enable the window editor, F6 deletes the line at the cursor position. Deleted lines are stored in a common copy/retrieve text stack. This provides a way to copy, delete, and retrieve text between and within windows. SF6 Deletes window, or deletes text block to end of page.
SeeView Function Key Reference F8 Deleted or copied lines are retrieved from a common copy/retrieve text stack. This makes it possible to copy, delete, or retrieve text between and within windows. F8 Copies current line. If the cursor is on the sill of a window, F8 copies the line of text on the sill into the copy/retrieve text stack. If the cursor is within a window and the window is in edit mode, the line of text designated by the cursor is copied into the copy/retrieve stack.
SeeView Function Key Reference F10 When you define a window in this manner, you often use the enable free-cursor mode key, SF5. F10 Joins window or text line. If the window designated by the cursor is not in edit mode, the window is joined with a neighboring window. The neighbor to which the current window is joined is determined by the cursor location. The edge nearest the cursor position is the one joined to a neighboring window that is either above or to the right of the current window.
SeeView Function Key Reference SF12 window. If there is no text on the sill, the cursor is moved to the sill so you can define the target text. Subsequent invocations of F12 perform a search for the target. The target text is bounded by a pair of the following delimiters: quote, (“), slash (/), backslash (\), or single quote (‘). You can search the cache either forward or backward by placing a plus sign (+) or minus sign (-) in front of the delimited target text.
SeeView Function Key Reference F14 This function, in effect, is one in which the cursor defines the new left edge of the current text when you press the function key. F14 Displays HELP ALL information on the Help page. User pages one through lastpage are reserved for user-defined windows. In addition to these pages, one extra page is set aside for user help, process status information, and interactive development of SeeView programs. This extra page is not accessed with the F1 or F2 keys.
SeeView Function Key Reference SF16 SF16 Exits and shuts down environment. This function key completely shuts down the SeeView environment. All programs initiated by the SeeView program are stopped and all context maintained by the SeeView program is destroyed. A variety of sanity checks are performed to determine whether a shutdown is acceptable, and an advisory message is issued requesting that you press SF16 again. PrevPage Displays previous page of window text.
SeeView Function Key Reference DeleteLine DeleteLine Specifies EOFSEEK ON/OFF. When the EOFSEEK option is ON, the current window automatically displays subsequent text pages every refresh interval until the end-of-file of the cache appears. If the current window is defined as an EOFONLY window, this option toggles EOFONLY ON/OFF. (For a description of refresh intervals, see the REFRESH option of the ALTER on page 9-9.
SeeView Function Key Reference HP NonStop SeeView Manual—526355-004 B -12 DeleteLine
C Sample Script The script on the following pages displays file information and performs operations against files contained in a subvolume. The file is on: \CENTREG.$THIRD.SEEX.APPENDIX. When the script is first executed, it displays the prompt Enter Subvol. If you respond to this prompt with the name of a subvolume (for example, $DATA.SEEC10) the files contained in that subvolume are displayed in the Files menu.
Sample Script ?MENU MyMenu {-----------} [#subvol [ ] <==? CALL FileInfo ( #MENUINPUT ); ] <==? This script displays file information and performs operations against files displayed in a specified subvolume. Operations are performed on a file by "marking" it with the letter representing the operation that is to be performed against the marked file. Operations include: C D F G I P S X -> -> -> -> -> -> -> -> COPY or display the first few pages of a file DUP file, prompt for .
Sample Script The "scratch" cache is then sequentially read with the READ scratch CACHE option, and the SEARCH statement is used to search the MyMenu cache for any of the marks that appear below. If a mark is found, then the rules contained in the table below are used to form a FUP command and to fold the marked filename into the "command template" described below.
Sample Script PARM #sv; VAR #s ,#z ; TASK fup; #subvol := #sv; { #sv = subvol for FUP INFO #sv.* { scratch string variable { scratch string variable { Fup task to do copy to Files menu { set global to prompt response WITH fup; { WRITE fup,"info " & #subvol & ".*"; { DO BEGIN { READ fup, #s; { #z := #TAKE #s; { END UNTIL #TASKPROMPTING OR (#z="$") DELETE Files!; TASK fup COPY Files; with fup for #TASKxxx intrinsics do FUP INFO #sv.* Parse response until info starts with a $ or \ or prompt.
Sample Script { { If no files marked, do a INFO ,DETAIL on the passed PARM #file. {----------------------------------------------------------------------} PARM #file; { file pointed to.
Sample Script {-------------------------------------------------------} { Have #opfile to do #rule against and #prompt response } { folded into #rule if required. Now do operation, and } { highlight each file as operation is performed on it. } {-------------------------------------------------------} LINE #menuline+row+1,#menucol+2;v(r); { Highlight file, CALL FileOp(#opFile,#rule,waitForOp); { do operation, LINE #MENULINE+row+1,#MENUCOL+1; { remove mark, and " "; v[#fvmenubody]; { un-highlight file.
Sample Script IF #FKEY=16 THEN #parm :=""; CW row,col,1,1; UNLOCK; { escape { clear prompt { unlock keyboard ?PROC FileOp { #file , #command , wait } {--------------------------------------} { This proc performs #command against #file in #subvol using FUP. { { If #command contains a ^ then #file is folded into #command at { the location of the ^ character. If ^ is not present then { #file is folded in at end of #command.
Sample Script HP NonStop SeeView Manual—526355-004 C- 8
D PCT.INI Recommendations These PCT.INI file settings are suggested for a PC that is using the SeeView program with the HP EM6530 PCT terminal emulator: COLOR_MAPPING=ON (if a color monitor is attached) UNDERLINE_MAPPING=OFF NORMAL_INTENSITY=LOW CURSOR_TYPE=BLOCK HP recommends that you not specify the EGA_PALETTE option. If you do not specify this option, PCT defaults to a standard color palette and the SeeShell Extras Color menu can operate properly.
PCT.
E ASCII Character Set Ch Dec Name Ch Dec Name Ch Dec Name Nul 0 Null + 43 Plus V 86 Upper V Soh 1 Start heading , 44 Comma W 87 Upper W Stx 2 Start of text - 45 Minus X 88 Upper X Etx 3 End of text .
ASCII Character Set Ch Dec Name Ch Dec Name Ch Dec Name ! 33 Exclamation L 76 Upper L w 119 Lower w " 34 Quotation mark M 77 Upper M x 120 Lower x # 35 Number sign N 78 Upper N y 121 Lower y $ 36 Dollar " O 79 Upper O z 122 Lower z % 37 Percent " P 80 Upper P { 123 Left brace & 38 Ampersand Q 81 Upper Q | 124 Vertical line ' 39 Apostrophe R 82 Upper R } 125 right brace ( 40 Left paren S 83 Upper S ~ 126 Tilde ) 41 Right pare
Index Numbers 6500-series terminal function keys B-1 A Abbreviations 9-1 ACCEPT statement 5-17, 9-4 Alarm 9-22 ALPHA string operator 9-148 ALTER FRAMEALPHA ON 6-10 ALTER SHELL statement 7-1 ALTER statement 9-9 ALTER STMTTRACE ON 6-10 Ampersand (&) 9-147 Arithmetic operators 5-14 ASCII character set E-1 ASSIGN CACHEFILE parameter A-4 Assigned windows 3-4 B Backup operations 2-17 BEGIN statement 9-22 BELL statement 9-22 BELOW statement 9-23 BESIDE statement 9-24 Blank I/O fields 5-30 Block mode 1-5 Boolean
D Index Command? item, changing in menu 2-4 Comments delimiting 9-141 including in code 6-9 Communications device information 2-7 Compound statements 9-22 Conditional statements 9-56 Configured timeouts 3-12 Configuring tasks 2-28 CONNECT command 4-3 Control 27 operation 4-7 Control characters 3-13 CONTROLBUF protocol 9-67 Conventions, following 6-5 Conversational mode 1-5 CREATORUSERNAME string intrinsic 9-152 Cursor arrow keys 3-6 CURSOR statement 9-29 Custom shells 2-32 D DATE string intrinsic 9-152 D
F Index F F1 function key 3-10, B-3 F10 function key B-7 F11 function key B-7 F12 function key B-7 F13 function key B-8 F14 function key 3-3, B-9 F15 function key B-9 F16 function key B-9 F2 function key 3-10, B-3 F3 function key B-3 F4 function key B-4 F5 function key B-4 F6 function key B-5 F7 function key B-5 F8 function key B-6 F9 function key B-6 FastShell 6-2 Field attribute productions 5-21 FIELDS option 5-23 Fields, updating 5-23 File operations Files option 2-11 multiple 2-14 Files deleting 4-9 e
G Index Function keys (continued) SF10 B-7 SF11 B-7 SF12 B-8 SF13 B-8 SF14 B-9 SF15 B-9 SF16 B-10 SF2 B-3 SF3 B-3 SF4 B-4 SF5 B-4 SF6 B-5 SF7 B-5 SF8 B-6 SF9 B-6 Shift-NextPage B-10 Shift-PrevPage B-10 Shift-RollDown B-10 Shift-RollUp B-10 FVBODY string intrinsic 9-155 FVMENUBODY string intrinsic 9-155 G GET command 4-5 GOODBYE statement 9-45 GRAPH statement 9-46 GUI, cooperative workstation 5-37 I IF statement 9-56 IN file mode A-4 INFO command 4-6 INFO statement 9-59 INFO string operator 9-149 Input m
M Index LINE statement 9-62 LINE25 statement 9-63 LISTDEV statement 9-64 LOAD statement 9-66 Loading a file 4-2 LOCK statement 9-67 Locking the keyboard 9-67 Log file 4-11 Logging off 9-45 off SeeShell 1-2 onto SeeShell 1-2 onto SeeView 9-52 M MENU directive 8-1 Menu productions 7-1 MENUCACHEFILE string intrinsic 9-155 MENUCACHELINE string intrinsic 9-156 MENUCACHELINEPTR string intrinsic 9-156 MENUCOL string intrinsic 9-156 MENUEDITMODE string intrinsic 9-157 MENUHEADING string intrinsic 9-157 MENUHEIGH
P Index Operators (continued) shift 5-14 string 5-14, 5-16 ORD string operator 9-150 P PAGE statement 9-74 PAGE string intrinsic 9-162 PAGEMSG statement 9-75 Pages 1-8 PAGESFREE string intrinsic 9-162 PAGESUSED string intrinsic 9-162 PARAM CACHE parameter A-2 EXTENSIBLE parameter A-2 HISTORY parameter A-3 LASTPAGE parameter A-3 MODEMWAIT parameter A-3 PEP parameter A-3 POOLPAGES parameter A-3 SERVERMODE parameter A-3 SYMBOLS parameter A-3 TASKS parameter A-3 Parentheses 9-140 PARM statement 9-76 PC funct
Q Index Programming (continued) example of using function keys 5-26 example of window production 5-28 example with a procedure 5-3 example with directives 5-5 guidelines 6-1 sample scripts 6-1 script development sequence 6-7 Prompt productions 5-9 Prompts modal 5-17 modeless 5-17, 5-19 responding to 3-9 Protocol, CONTROLBUF 9-67 PURGE command 4-9 PUSH statement 9-84 Q Question mark (?) 8-1 Quotation mark 9-142 R READ requestor 5-38 READ statement 9-85 Relational operators 5-14 Relative locations in menu
S Index Seedit (continued) SEND command 4-10 SET command 4-11 SUBVOLS command 4-12 SYSTEM command 4-12 USERS command 4-13 VOLUME command 4-13 SEELOCL 2-33 SEENET 2-33 SeeShell accessing the script 6-2 backup operations 2-17 changing a command 2-4 exiting 1-2 exiting in edit mode 1-2 file operations 2-11 logging off 1-2 logging onto 1-2 main menu 1-2 menus 2-1 running 1-1 SeeView Extras menu 2-23 standard 5-36 startup mode A-4 System Devices menu 2-2 System Utility menu 2-7 SeeView communicating with 3-9 e
S Index SF5 function key B-4 SF6 function key B-5 SF7 function key B-5 SF8 function key B-6 SF9 function key B-6 SHELL string intrinsic 9-163 Shells 1-7, 2-32 Shift operators 5-14 productions 5-7 Shift operators 5-14 Shift-NextPage function key B-10 Shift-PrevPage function key B-10 Shift-Return key 3-7 Shift-RollDown function key B-10 Shift-RollUp function key B-10 SHOWPAGE statement 9-99 SHUTDOWN statement 9-100 Sills defined 1-6 window 3-5 Site SeeLocl menu 2-33 SIZE string operator 9-150 SPACES string
S Index Statements (continued) PAGEMSG 9-75 PARM 9-76 PEEROK 5-38 PLOT 9-80 POP 9-81 PRINT 9-82 PUSH 9-84 READ 9-85 RETURN 9-87 RIGHT 9-87 RULER 9-88 RUN 9-88 SAVE 9-92 SCAN 9-93 SEARCH 9-94 SECURE 9-98 SETPAGE 9-99 SHOWPAGE 9-99 SHUTDOWN 9-100 STATUS 9-101 STOP 9-102 summary 9-1 TASK 9-104 TRANSLATE 9-112 UP 9-112 VARIABLE 9-113 VIDEO 9-114 WAIT 9-115 WHILE 9-117 WINDOW 5-23, 9-119 WITH 9-133 WRITE 9-134 WRITEREAD 9-139 STATUS statement 9-101 STOP statement 9-102 Stopping a SeeView process 9-102 Stopping
S Index String (continued) intrinsics (continued) MENUPRODUCTION2 9-159 MENUTASKID 9-160 MENUTEXT 9-160 MENUTOKEN 9-161 MENUTOKENINDEX 9-161 MENUWIDTH 9-161 MYPROCESSNAME 9-162 PAGE 9-162 PAGESFREE 9-162 PAGESUSED 9-162 PRODNAME 9-163 PRODNUM 9-163 REVISION 9-163 SERVERMODE 9-163 SHELL 9-163 SPACES 9-164 TASK 9-133 TASKCACHEFILE 9-164 TASKCACHEFREE 9-164 TASKCACHELINE 9-165 TASKCACHELINES 9-165 TASKCACHEPAGES 9-165 TASKCOL 9-166 TASKCOUNT 9-166 TASKCPU 9-166 TASKDATA 9-167 TASKEDITMODE 9-167 TASKERROR 9-1
T Index String (continued) operators (continued) ORD 9-150 PROC 9-150 SIZE 9-150 SPECIAL 9-150 TAKE 9-150 TASK 9-150 TRIM 9-151 UPCASE 9-151 tokens 5-16 variables 5-12, 5-14, 9-144 SUBVOLS command 4-12 Symbols left brace 9-141 left bracket 9-141 octomorph 9-144 parentheses 9-140 pound sign 9-144 quotation mark 9-142 SYSTEM command 4-12 System Devices menu 2-2 System Utility menu 2-7 T TACL startup values A-2 TAKE string operator 9-150 Task configuring 2-28 defined 1-6 saving configurations 2-29 variables
U Index Toggle menu functions 6-6 Tokens 5-16 Top-down development 6-7 TOSVERSION string intrinsic 9-178 TRANSLATE statement 9-112 TRIM string operator 9-151 type ahead 3-8 U UP statement 9-112 UPCASE string operator 9-151 Updates, direct field 5-32 User documentation 6-10 interface 6-3 pages 1-8 programs, configuring 2-28 USERNAME string intrinsic 9-178 USERS command 4-13 V VARIABLE statement 9-29, 9-113 Variables declaring 9-29 integer 5-12, 5-14 string 5-12, 5-14 symbolic 5-11 task 5-12 VERSION strin
Special Characters Index HP NonStop SeeView Manual—526355-004 Index -14