You are on page 1of 365

HPE NonStop SeeView Manual

Abstract
HPE NonStop SeeView is a Script Execution Environment and Virtual Interface to
Extensible Windows (SeeView) for command language standard (CLS) programs.

SeeView provides block-mode shell facilities for CLS programs that execute on HPE
NonStop servers.
SeeView also provides command-interpreter shell facilities for CLS programs that
execute on HPE NonStop servers.

SeeView also provides server-mode shell facilities for NonStop host and web client
interfaces to interactive CLS programs that execute on HPE NonStop servers.

Product Version
Applies to: T6965D40^AAI, T6965H01^AAJ, T6965L01 or later for G-, H-, J-, L-series respectively.

Part Number: P11260-001


Published: October 15, 2018

HPE NonStop SeeView Manual Page 1 of 365


Supported Release Version Updates (RVUs)
This publication supports (until otherwise indicated by its replacement publication):

 G06.28 and all subsequent G-series RVUs

 H06.03 and all subsequent H-series RVUs

 J06.08 and all subsequent J-series RVUs

 L14.02 and all subsequent L-series RVUs

Part Number Published


P11260-001 October 2018 HP > HPE

Document History
Part Number Product Version Published
135082 D40AAE January 1998
526355-001 D40AAF September 2003
526355-002 D40AAG April 2004
526355-003 D40AAH April 2005
526355-004 D40AAH and H01 or later June 2005
526355-005 D40AAI or later and H01AAJ or later February 2006

HPE NonStop SeeView Manual Page 2 of 365


Table of Contents
HPE NonStop SeeView Manual ........................................................................................... 1
Abstract ........................................................................................................................... 1
Product Version ............................................................................................................... 1
Supported Release Version Updates (RVUs) .................................................................. 2
Document History ............................................................................................................ 2
Table of Contents ................................................................................................................. 3
List of Figures and Tables ................................................................................................. 10
What’s New in This Manual ................................................................................................ 12
New and Changed Information ......................................................................................... 12
About This Manual ............................................................................................................. 13
Audience ........................................................................................................................... 13
Related Manuals ............................................................................................................... 13
Manual Organization ......................................................................................................... 14
Notation Conventions ........................................................................................................ 14
Hypertext Links .............................................................................................................. 14
General Syntax Notation ............................................................................................... 15
Notation for Messages................................................................................................... 18
Notation for Management Programming Interfaces ....................................................... 19
Section 1: Introduction....................................................................................................... 21
Standard SeeShell Interface ............................................................................................. 21
Starting the Standard SeeShell ..................................................................................... 21
Exiting the SeeShell ...................................................................................................... 22
SeeView Overview ............................................................................................................ 23
Multiple Programs.......................................................................................................... 23
Terminal Pages ............................................................................................................. 24
Menus............................................................................................................................ 24
Scripts ........................................................................................................................... 24
Features ........................................................................................................................ 24
SeeView Terms ................................................................................................................. 26
Task............................................................................................................................... 26
Window.......................................................................................................................... 26
Sill.................................................................................................................................. 26
Cache ............................................................................................................................ 27
Scroll ............................................................................................................................. 27
Scripts ........................................................................................................................... 27
Shell .............................................................................................................................. 28
External Scripts ............................................................................................................. 28
Terminal Pages ............................................................................................................. 28
Help Page...................................................................................................................... 28
User Pages .................................................................................................................... 28
SeeView Help ................................................................................................................... 28
Help on SeeView Statements ........................................................................................ 29

HPE NonStop SeeView Manual Page 3 of 365


Help on SeeShell Menus and Menu Items .................................................................... 30
Section 2: Using SeeShell Menus ..................................................................................... 31
System Devices Menu ...................................................................................................... 32
Obtaining Disk Information ............................................................................................ 33
Changing a Command................................................................................................... 34
Obtaining Printer Information ......................................................................................... 36
Obtaining Communications Device Information ............................................................. 37
System Utility Menu .......................................................................................................... 37
Performing File Operations ............................................................................................ 39
Multiple File Operations ................................................................................................. 42
Performing Backup Operations ..................................................................................... 45
Performing Spooler Operations ..................................................................................... 48
SeeView Extras Menu ....................................................................................................... 51
Changing Screen Color Attributes ................................................................................. 53
Configuring Tasks.......................................................................................................... 55
Editing a File .................................................................................................................. 57
Executing External Script Files ...................................................................................... 58
Custom Shells ................................................................................................................... 60
SEENET ........................................................................................................................ 61
SEELOCL ...................................................................................................................... 61
SEECSTM ..................................................................................................................... 61
Section 3: Using the SeeView Program ............................................................................ 62
Running the SeeView Program ......................................................................................... 62
SeeView Startup Syntax ................................................................................................ 62
Exiting the SeeView Program (SF16) ............................................................................ 63
Getting Around in the SeeView Program .......................................................................... 63
Selecting Menu Items (Return) ...................................................................................... 64
Accessing the Help Page (F14) ..................................................................................... 64
Recovering a Terminal Display (SF14) .......................................................................... 65
Interacting With Windows .............................................................................................. 65
Displaying Text Within Windows ................................................................................... 68
Sending Commands (Return, Shift-Return) ................................................................... 69
Responding to Prompts ................................................................................................. 70
Displaying Different Terminal Pages (F1, F2, SF1, SF2) ............................................... 71
Message Caches .............................................................................................................. 72
Return Key ........................................................................................................................ 73
Break Key ......................................................................................................................... 74
Configured Timeouts ......................................................................................................... 74
Control Characters ............................................................................................................ 75
Function Key Summary ..................................................................................................... 75
Section 4: Seedit Utility ...................................................................................................... 77
Editing Text Files .............................................................................................................. 78
Loading a File ................................................................................................................ 79
Saving a File .................................................................................................................. 79
Seedit Commands ............................................................................................................ 79
CONNECT ........................................................................................................................ 80

HPE NonStop SeeView Manual Page 4 of 365


FILES ................................................................................................................................ 81
GET................................................................................................................................... 81
HELP................................................................................................................................. 82
INFO ................................................................................................................................. 83
MONITOR ......................................................................................................................... 84
MSG .................................................................................................................................. 84
OBEY ................................................................................................................................ 85
PURGE ............................................................................................................................. 86
RUN .................................................................................................................................. 86
SEND ................................................................................................................................ 87
SET ................................................................................................................................... 88
SUBVOLS ......................................................................................................................... 89
SYSTEM ........................................................................................................................... 89
USERS.............................................................................................................................. 90
VOLUME ........................................................................................................................... 90
Section 5: SeeView Language Elements .......................................................................... 92
Statements ........................................................................................................................ 92
Program Structure ............................................................................................................. 93
Sections......................................................................................................................... 94
Procedures .................................................................................................................... 94
Menus............................................................................................................................ 95
Variables ......................................................................................................................... 103
Integer Variables ......................................................................................................... 104
String Variables ........................................................................................................... 104
Task Variables ............................................................................................................. 104
Expressions .................................................................................................................... 106
Integer Assignment ......................................................................................................... 107
String Assignment ........................................................................................................... 107
String Intrinsics ............................................................................................................... 107
String Operators .............................................................................................................. 108
String Tokens .................................................................................................................. 109
Modal and Modeless Dialogue Boxes ............................................................................. 109
Modal Environments .................................................................................................... 109
Modeless Environments .............................................................................................. 110
Modal Prompts ................................................................................................................ 110
Modeless Prompts .......................................................................................................... 112
Field Attribute Productions .............................................................................................. 114
Updating Fields ............................................................................................................... 117
Function Keys ................................................................................................................. 118
Window Productions ....................................................................................................... 120
Invisible Fields ................................................................................................................ 122
Direct Field Updates........................................................................................................ 124
SeeView Externals .......................................................................................................... 128
ServerMode .................................................................................................................... 129
Section 6: SeeView Programming ................................................................................... 133
Familiarize Yourself With the SeeView Program ............................................................. 133

HPE NonStop SeeView Manual Page 5 of 365


Study the SeeView ISP and This Manual .................................................................... 133
Understand the SeeView Program .............................................................................. 134
Understand Script Development on a Small Scale First .............................................. 135
Develop an Understanding of SeeView Statements .................................................... 135
Design the Presentation Interface ................................................................................... 135
Design a Presentation Interface, Not a New Application ............................................. 135
Understand the Product ............................................................................................... 136
Use the Product as a New User .................................................................................. 136
Develop a Firm Understanding of Utility Command Structure ..................................... 136
Define What You Want Your Script to Accomplish ...................................................... 137
Establish Menu and Window Contents ........................................................................ 137
Follow Conventions for Placing Menus and Windows ................................................. 137
Follow Human Interface Standards ............................................................................. 138
Identify Which Types of Menus to Use ........................................................................ 138
Develop the Script ........................................................................................................... 139
Develop Top-Down ...................................................................................................... 139
Use Relative Menu Locations ...................................................................................... 140
Use the Same Cache for Each Menu .......................................................................... 140
Use Default Productions .............................................................................................. 141
Write Your Procedures ................................................................................................ 141
Comment As You Code ............................................................................................... 142
Test As You Code ....................................................................................................... 142
Write User Documentation .............................................................................................. 142
Section 7: SeeView Interpreter Interface ........................................................................ 143
Window Sills .................................................................................................................... 143
Menu Production ............................................................................................................. 143
Disk Files or Text Caches ............................................................................................... 144
Edit-Mode Windows ........................................................................................................ 144
Section 8: SeeView Directives ......................................................................................... 147
MENU ............................................................................................................................. 147
PROCEDURE ................................................................................................................. 149
SECTION ........................................................................................................................ 149
SEEVIEW ........................................................................................................................ 150
Section 9: SeeView Statements and Script Symbols .................................................... 152
ACCEPT ......................................................................................................................... 155
ALTER ............................................................................................................................ 160
BEGIN ............................................................................................................................. 173
BELL ............................................................................................................................... 174
BELOW ........................................................................................................................... 174
BESIDE ........................................................................................................................... 175
BREAK ............................................................................................................................ 176
CALL ............................................................................................................................... 177
CI .................................................................................................................................... 178
CLEAR ............................................................................................................................ 179
CLEARW ......................................................................................................................... 179
CURSOR ........................................................................................................................ 180

HPE NonStop SeeView Manual Page 6 of 365


DECLARE ....................................................................................................................... 180
DELAY ............................................................................................................................ 181
DELETE .......................................................................................................................... 182
DISPLAY ......................................................................................................................... 183
DO................................................................................................................................... 187
DOWN............................................................................................................................. 188
END ................................................................................................................................ 189
EXECUTE ....................................................................................................................... 189
FLUSH ............................................................................................................................ 191
FOR ................................................................................................................................ 192
FRAMEVIDEO ................................................................................................................ 194
GOODBYE ...................................................................................................................... 197
GRAPH ........................................................................................................................... 198
HELLO ............................................................................................................................ 204
HELP............................................................................................................................... 205
HISTORY ........................................................................................................................ 207
IF ..................................................................................................................................... 209
INFO ............................................................................................................................... 211
INVOKE .......................................................................................................................... 212
LEFT ............................................................................................................................... 213
LET ................................................................................................................................. 214
LINE ................................................................................................................................ 214
LINE25 ............................................................................................................................ 215
LISTDEV ......................................................................................................................... 216
LOAD .............................................................................................................................. 218
LOCK / UNLOCK ............................................................................................................ 219
MSG ................................................................................................................................ 220
ON................................................................................................................................... 221
OPEN .............................................................................................................................. 221
PAGE .............................................................................................................................. 226
PAGEMSG ...................................................................................................................... 227
PARM.............................................................................................................................. 227
PLOT............................................................................................................................... 231
POP ................................................................................................................................ 232
PRINT ............................................................................................................................. 233
PROMPT......................................................................................................................... 234
PUSH .............................................................................................................................. 235
READ .............................................................................................................................. 236
RETURN ......................................................................................................................... 238
RIGHT ............................................................................................................................. 238
RULER ............................................................................................................................ 239
RUN ................................................................................................................................ 239
SAVE .............................................................................................................................. 243
SCAN .............................................................................................................................. 245
SEARCH ......................................................................................................................... 246
SECURE ......................................................................................................................... 249

HPE NonStop SeeView Manual Page 7 of 365


SETPAGE ....................................................................................................................... 251
SHOWPAGE ................................................................................................................... 251
SHUTDOWN ................................................................................................................... 252
STATUS .......................................................................................................................... 253
STOP .............................................................................................................................. 254
TASK............................................................................................................................... 255
TRANSLATE ................................................................................................................... 264
UP ................................................................................................................................... 265
VARIABLE ...................................................................................................................... 265
VIDEO ............................................................................................................................. 266
WAIT ............................................................................................................................... 268
WHILE............................................................................................................................. 270
WINDOW ........................................................................................................................ 271
WITH ............................................................................................................................... 285
WRITE ............................................................................................................................ 286
WRITEREAD .................................................................................................................. 292
Parentheses ( ) ............................................................................................................... 293
Brackets [ ] ...................................................................................................................... 294
Left Brace { ..................................................................................................................... 294
Quotation Mark “ ............................................................................................................. 294
Pound Sign # .................................................................................................................. 295
String Operators and String Intrinsics ............................................................................. 301
String Operators .......................................................................................................... 301
String Intrinsics ............................................................................................................ 304
Appendix A: Running the SeeView Program ................................................................. 335
Installation ....................................................................................................................... 335
How to Run the SeeView Program ................................................................................. 335
Startup Values ................................................................................................................ 336
PARAMs in Startup Message ...................................................................................... 338
Startup Modes ................................................................................................................. 338
SeeShell Mode ............................................................................................................ 339
Standard In-File Mode ................................................................................................. 339
Environment Switch Mode ........................................................................................... 339
Interactive Mode .......................................................................................................... 339
Appendix B: SeeView Function Key Reference ............................................................. 340
6500-Series Terminal Function Keys .............................................................................. 340
PC Terminal Function Keys ............................................................................................ 341
Detailed Function Key Reference ................................................................................... 342
F1 ................................................................................................................................ 342
SF1 .............................................................................................................................. 342
F2 ................................................................................................................................ 342
SF2 .............................................................................................................................. 342
F3 ................................................................................................................................ 342
SF3 .............................................................................................................................. 343
F4 ................................................................................................................................ 343
SF4 .............................................................................................................................. 343

HPE NonStop SeeView Manual Page 8 of 365


F5 ................................................................................................................................ 343
SF5 .............................................................................................................................. 343
F6 ................................................................................................................................ 344
SF6 .............................................................................................................................. 344
F7 ................................................................................................................................ 344
SF7 .............................................................................................................................. 345
F8 ................................................................................................................................ 345
SF8 .............................................................................................................................. 345
F9 ................................................................................................................................ 345
SF9 .............................................................................................................................. 346
F10 .............................................................................................................................. 346
SF10 ............................................................................................................................ 346
F11 .............................................................................................................................. 346
SF11 ............................................................................................................................ 347
F12 .............................................................................................................................. 347
SF12 ............................................................................................................................ 347
F13 .............................................................................................................................. 347
SF13 ............................................................................................................................ 348
F14 .............................................................................................................................. 348
SF14 ............................................................................................................................ 348
F15 .............................................................................................................................. 348
SF15 ............................................................................................................................ 349
F16 .............................................................................................................................. 349
SF16 ............................................................................................................................ 349
PrevPage ..................................................................................................................... 349
Shift-PrevPage ............................................................................................................ 349
NextPage ..................................................................................................................... 349
Shift-NextPage ............................................................................................................ 349
RollDown ..................................................................................................................... 350
Shift-RollDown ............................................................................................................. 350
RollUp.......................................................................................................................... 350
Shift-RollUp ................................................................................................................. 350
InsertLine..................................................................................................................... 350
DeleteLine ................................................................................................................... 350
Appendix C: Sample Script .............................................................................................. 351
Appendix D: PCT.INI Recommendations ........................................................................ 359
Appendix E: ASCII Character Set .................................................................................... 360

HPE NonStop SeeView Manual Page 9 of 365


List of Figures and Tables
Table 2-1. System Devices Menu Commands...................................................................... 32
Table 2-2. System Utility Menu Commands.......................................................................... 38
Table 2-3. SeeView Extras Menu Commands ...................................................................... 51
Figure 3-1. Window Components ......................................................................................... 65
Figure 3-2. SeeView Window With Sill ................................................................................. 67
Figure 3-3. SeeView Terminal Pages ................................................................................... 72
Table 3-1. Summary of Function Key Operations for 6500-Series Terminals ....................... 75
Table 4-1. Summary of Seedit Commands ........................................................................... 77
Table 4-2. Edit-Mode Key Functions .................................................................................... 78
Example 5-1. A Simple SeeView Program ........................................................................... 93
Example 5-2. Simple SeeView Program With a Procedure .................................................. 95
Example 5-3. SeeView Program With ?MENU, ?PROC, and ?SECTION Directives ........... 97
Figure 5-1. SeeView Output From the Program in Example 5-3........................................... 98
Example 5-4. Example of a Default and Shift Production ..................................................... 98
Example 5-5. Example of Menus ........................................................................................ 100
Figure 5-2. SeeView Output From the Program in Example 5-5......................................... 101
Example 5-6. Example of Prompts With Prompt Productions ............................................. 102
Figure 5-3. SeeView Output From the Program in Example 5-6......................................... 103
Example 5-7. Example of TASK Variable Usage ................................................................ 105
Example 5-8. Example of Modal Prompt Usage ................................................................. 111
Figure 5-4. Modal Prompt From the Program in Example 5-8 ............................................ 112
Figure 5-5. SeeView Output From the Program in Figure 5-4 ............................................ 112
Example 5-9. Example of Modeless Prompt Usage ........................................................... 113
Figure 5-6. Modeless Prompt From the Program in Example 5-9....................................... 114
Example 5-10. Example of Field Attribute Production Usage ............................................. 115
Figure 5-7. SeeView Output From the Program in Example 5-10....................................... 116
Example 5-11. Example of Various Field Update Techniques ............................................ 117
Figure 5-8. SeeView Output From the Program in Example 5-11....................................... 118
Example 5-12. Example Using Function Keys to Perform SQL Operations........................ 119
Figure 5-9. SeeView Output From the Program in Example 5-12 When F5 Is Pressed ..... 120
Figure 5-10. SeeView Output From the Program in Example 5-12 When F7 Is Pressed ... 120
Example 5-13. Example of a Nonmenu Window Production .............................................. 121
Figure 5-11. SeeView Output From the Program in Example 5-13 ..................................... 122
Example 5-14. Example of Defining a Blank or Invisible Input Field ................................... 122
Figure 5-12. SeeView Output From the Program in Example 5-14 ..................................... 124
Example 5-15. Example Program Showing Direct Field Update Techniques ..................... 124
Figure 5-13. SeeView Output From Program in Example 5-15........................................... 127
Figure 5-14. Output When Return Is Pressed in the First Name Field ................................ 127
Figure 5-15. Output When Return Is Pressed in the FIRST Name Menu ........................... 128
Figure 5-16. Output When Return Is Repeatedly Pressed.................................................. 128
Example 5-16. Example of an External Script to Configure an Environment ...................... 128
Figure 5-17. SeeView Output From the Program in Example 5-16 ..................................... 129

HPE NonStop SeeView Manual Page 10 of 365


Example 5-17. Example of a SeeView ServerMode Script ................................................. 130
Example 5-18. Server Output From the ServerMode Script in Example 5-17..................... 131
Example 5-19. Requestor Reply Received From the Script in Example 5-17 ..................... 132
Figure 7-1. Example of Edit-Mode Language Interface on the Help Page .......................... 145
Example 7-1. Example of a User-Defined SEECSTM File.................................................. 145
Example 8-1. Example of MENU Directive ......................................................................... 148
Example 8-2. Example of SEEVIEW Directive ................................................................... 150
Table 9-1. SeeView Statement Summary and Abbreviations ............................................. 152
Table 9-2. SeeView Script Symbols ................................................................................... 154
Example 9-1. Sample SeeView Program............................................................................ 196
Table 9-3. CONTROLBUF Protocol .................................................................................... 219
Table B-1. Summary of Function Key Operations for 6500-Series Terminals .................... 340
Table B-2. Summary of Function Key Operations for the PC ............................................. 341

HPE NonStop SeeView Manual Page 11 of 365


What’s New in This Manual
New and Changed Information
Added the LOGONSTRONG option for software product revisions T6965D40AAI and
T6965H01AAJ to the ALTER statement descriptions in Section 9: SeeView
Statements and Script Symbols.

HPE NonStop SeeView Manual Page 12 of 365


About This Manual
This manual describes the SeeView product, a command interpreter shell facility for
interactive text interface programs using the HPE 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. Appendix A: Running the SeeView Program
describes how to install the SeeView program. Appendix B: SeeView Function Key
Reference through Appendix E: ASCII Character Set provide reference information.

Audience
This manual addresses two audiences. Users who want to use the standard SeeShell
only should read Sections 1 through 3. Programmers who want to write SeeView
programs or learn about the SeeView product in greater detail should read the entire
manual.
This manual makes the following assumptions:
 Users who want to use the standard SeeShell are familiar with the HPE NonStop
operating system and its utilities.
 Programmers who want to write SeeView programs know the basic principles of
structured-language programming.

Related Manuals
This manual assumes you are somewhat familiar with the HPE NonStop operating
system (OS), utilities, subsystems, and command interpreters including TACL,
SPOOLCOM, FUP, ASAP, SCF, and so on. These documents provide information
about related HPE products that depend on the SeeView kernel object code:
 SeeView Server Gateway (SSG) Manual
 Web ViewPoint User’s Guide
 OSM guided procedures
 ASAP Server Manual
 ASAP Client Manual
 Data Definition Language (DDL) Reference Manual

HPE NonStop SeeView Manual Page 13 of 365


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 Tells how to run the SeeView program
Program
Section 4: Seedit Utility Describes the SeeView text editing and file
handling utility, Seedit
Section 5: SeeView Language Explains how to use the SeeView language
Elements elements to write programs
Section 6: SeeView Programming Provides an overview of how to write a program
with the SeeView product
Section 7: SeeView Interpreter Describes the SeeView command-interpreter
Interface interfaces
Section 8: SeeView Directives Gives detailed information about the SeeView
interpreter directives
Section 9: SeeView Statements Describes in detail the SeeView statements and
and Script Symbols script symbols
Appendix A: Running the Describes how to install the SeeView program
SeeView Program
Appendix B: SeeView Function Provides a function key reference for the SeeView
Key Reference program
Appendix C: Sample Script Contains a sample script that performs file
operations
Appendix D: PCT.INI Recommends settings for initializing the PCT.INI
Recommendations file on PCs that use the SeeView program with a
terminal emulator
Appendix E: ASCII Character Set Lists the ASCII characters and their decimal
values

Notation Conventions
Hypertext Links
Blue underline is used to indicate a hypertext link within text. By clicking a passage of
text with a blue underline, you are taken to the location described. For example:
This requirement is described under Backup DAM Volumes and Physical Disk
Drives on page 3-2.

HPE NonStop SeeView Manual Page 14 of 365


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

Computer type letters within text indicate C and Open System Services (OSS)
keywords and reserved words. Type these items exactly as shown. Items not enclosed
in brackets are required. For example:
myfile.c

italic computer type

Italic computer type letters within text indicate C and Open System Services
(OSS) variable items that you supply. Items not enclosed in brackets are required. For
example:
pathname

[ ] Brackets

Brackets enclose optional syntax items. For example:


TERM [\system-name.]$terminal-name
INT[ERRUPTS]
A group of items enclosed in brackets is a list from which you can choose one item or
none. The items in the list can be arranged either vertically, with aligned brackets on
each side of the list, or horizontally, enclosed in a pair of brackets and separated by
vertical lines. For example:

HPE NonStop SeeView Manual Page 15 of 365


FC [ num ]
[ -num ]
[ text ]
K [ X | D ] address

{ } Braces

A group of items enclosed in braces is a list from which you are required to choose one
item. The items in the list can be arranged either vertically, with aligned braces on
each side of the list, or horizontally, enclosed in a pair of braces and separated by
vertical lines. For example:
LISTOPENS PROCESS { $appl-mgr-name }
{ $process-name }
ALLOWSU { ON | OFF }

| 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. For example:
M address [ , new-value ]…
[ - ] {0|1|2|3|4|5|6|7|8|9}…
An ellipsis immediately following a single syntax item indicates that you can repeat that
syntax item any number of times. For example:
"s-char…"

Punctuation

Parentheses, commas, semicolons, and other symbols not previously described must
be typed as shown. For example:
error := NEXTFILENAME ( file-name ) ;
LISTOPENS SU $process-name.#su-name
Quotation marks around a symbol such as a bracket or brace indicate the symbol is a
required character that you must type as shown. For example:

HPE NonStop SeeView Manual Page 16 of 365


"[" repetition-constant-list "]"

Item Spacing

Spaces shown between items are required unless one of the items is a punctuation
symbol such as a parenthesis or a comma. For example:
CALL STEPMOM ( process-id ) ;
If there is no space between two items, spaces are not permitted. In this example, no
spaces are permitted between the period and any other items:
$process-name.#su-name

Line Spacing

If the syntax of a command is too long to fit on a single line, each continuation line is
indented three spaces and is separated from the preceding line by a blank line. This
spacing distinguishes items in a continuation line from items in a vertical list of
selections. For example:
ALTER [ / OUT file-spec / ] LINE

[ , attribute-spec ]…

!i and !o

In procedure calls, the !i notation follows an input parameter (one that passes data to
the called procedure); the !o notation follows an output parameter (one that returns
data to the calling program). For example:
CALL CHECKRESIZESEGMENT ( segment-id !i
, error ) ; !o

!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,o

!i:i

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. For example:

HPE NonStop SeeView Manual Page 17 of 365


error := FILENAME_COMPARE_ ( filename1:length !i:i
, filename2:length ) ; !i:i

!o:i

In procedure calls, the !o:i notation follows an output buffer parameter that has a
corresponding input parameter specifying the maximum length of the output buffer in
bytes. For example:
error := FILE_GETINFO_ ( filenum !i
, [ filename:maxlen ] ) ; !o:i

Notation for Messages


This list summarizes the notation conventions for the presentation of displayed
messages in this manual.

Bold Text

Bold text in an example indicates user input typed at the terminal. For example:
ENTER RUN CODE
?123
CODE RECEIVED: 123.00
The user must press the Return key after typing the input.

Nonitalic text

Nonitalic letters, numbers, and punctuation indicate text that is displayed or returned
exactly as shown. For example:
Backup Up.

lowercase italic letters

Lowercase italic letters indicate variable items whose values are displayed or returned.
For example:
p-register
process-name

[ ] Brackets

Brackets enclose items that are sometimes, but not always, displayed. For example:
Event number = number [ Subject = first-subject-value ]

HPE NonStop SeeView Manual Page 18 of 365


A group of items enclosed in brackets is a list of all possible items that can be
displayed, of which one or none might actually be displayed. The items in the list can
be arranged either vertically, with aligned brackets on each side of the list, or
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. The items in the list can be arranged either
vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair
of braces and separated by vertical lines. For example:
obj-type obj-name state changed to state, caused by
{ Object | Operator | Service }
process-name State changed from old-objstate to objstate
{ Operator Request. }
{ Unknown. }

| Vertical Line

A vertical line separates alternatives in a horizontal list that is enclosed in brackets or


braces. For example:
Transfer status: { OK | Failed }

% Percent Sign

A percent sign precedes a number that is not in decimal notation. The % notation
precedes an octal number. The %B notation precedes a binary number. The
%H notation precedes a hexadecimal number. For example:
%005400
%B101111
%H2F
P=%p-register E=%e-register

Notation for Management Programming Interfaces


This list summarizes the notation conventions used in the boxed descriptions of
programmatic commands, event messages, and error lists in this manual.

HPE NonStop SeeView Manual Page 19 of 365


UPPERCASE LETTERS

Uppercase letters indicate names from definition files. Type these names exactly as
shown. For example:
ZCOM-TKN-SUBJ-SERV

lowercase letters

Words in lowercase letters are words that are part of the notation, including Data
Definition Language (DDL) keywords. For example:
token-type

!r

The !r notation following a token or field name indicates that the token or field is
required. For example:
ZCOM-TKN-OBJNAME token-type ZSPI-TYP-STRING. !r

!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

HPE NonStop SeeView Manual Page 20 of 365


Section 1: Introduction
The SeeView product provides multiwindowed menu-driven interfaces, or shells, to
HPE utilities for NonStop systems on HPE 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.
The SeeView environment is interactive. You can alter the size and position of
windows to fit your needs or change the task whose output appears in a particular
window. The SeeView environment can also be menu driven. You can set up and use
menus to configure your windows and to interact with processes assigned to those
windows. The environment you set up can take many forms: a desktop, programmer's
workbench, operations interface, or a custom or standard environment to make your
job easier.
You can create SeeView shells through a structured programming language that
SeeView provides. You can develop the shell programs, called scripts, interactively
with SeeView function key operations.

Standard SeeShell Interface


SeeView provides a ready-made, standard shell called the SeeShell. The standard
SeeShell interface provides menus that allow you to work with files, display
information, and run programs concurrently. You can display information and access
programs such as the HPE Tandem Advanced Command Language (TACL), the File
Utility Program (FUP), the Subsystem Command Facility (SCF), and PSMail.
Through menu selection, SeeShell lets you invoke other shells containing user-defined
menus and procedures written in the SeeView scripting language.
Section 2: Using SeeShell Menus describes the general layout of the menus
provided by the standard SeeShell and explains how to access and interact with
menus. The standard environment is created the SeeShell program, which is usually
found on the same volume and subvolume as the SeeView product.

Starting the Standard SeeShell


To start the standard SeeShell, at the TACL prompt:
1> SEEVIEW / NAME /
The SeeShell main menu appears:

HPE NonStop SeeView Manual Page 21 of 365


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. If you make a wrong choice or complete a function, you can move the cursor to
another menu item (on any menu) and select a new item to continue.
Some menus contain input fields, areas for you to type in information, which will
customize the action of the menu. These menus typically appear on the screen when
you need to enter some information to complete a menu selection.

Exiting the SeeShell


To exit the SeeShell, press SF16. The SeeView program displays a warning message
saying that all SeeView activity will be stopped and prompts you to press SF16 again if
you still want to exit.

Logging Off From the SeeShell and Preserving Your


SeeShell Session
To log off the SeeShell and still preserve your SeeShell session, select the Goodbye
option from the SeeView Extras menu. To log back into the SeeShell session, type
HELLO at the sill (the bottom of the window) and enter the same password you use to
log on to the system.

Exiting SeeShell in Edit Mode


You can exit the SeeShell at any time as long as you do not have any windows open in
edit mode. The SeeView program does not let you exit if an edit-mode window is open,
and the program displays a warning message to prevent you from accidently losing
editing changes.
To exit the SeeShell in your edit mode:

HPE NonStop SeeView Manual Page 22 of 365


 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.

SeeView Overview
SeeView provides users of standard HPE terminals (or terminal emulators running on
a PC, Macintosh, or other workstation) with a windowed terminal display similar to
those on many PC or workstation-based products.
By using SeeView, you can display several windows on the workstation at the same
time, each one displaying the output from a different program. For example, you might
have three windows on the screen, one assigned to TACL, one to Peruse, and one to
an editor. After making changes to a program in the editor window, you could compile
the program by entering commands at the TACL window and then look at the listing
from the window assigned to Peruse. With SeeView, you can have several windows
displaying output from the same program (such as two windows, one displaying the
beginning of a file, the other the end). It is also possible to have several programs
share the same window.
SeeView gives you these key features:

 Concurrent operation of multiple programs


 Access to multiple terminal pages
 Greater productivity through easy-to-use menus and function keys
 Ability to customize the SeeView product through scripts
Multiple Programs
SeeView allows you to run many processes simultaneously on a single workstation
with the output of different processes displayed in different windows. When you no
longer need to see the output of a process, you can delete the window associated with
that process but retrieve the window at a later time when you need to interact with the
process once again.
SeeView also allows you to go back and look at earlier output and input from the
process.

HPE NonStop SeeView Manual Page 23 of 365


Terminal Pages
SeeView uses the display memory in the workstation to store windows. If you list
something to your workstation that is too long to fit on one screen, the text scrolls off
the screen, but you can press PREV PAGE to go back and look at that text. SeeView
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. You can associate a complex set of
commands with a simple menu entry, enabling you to create a menu-driven
environment for both new and experienced users.
Once you learn a few simple function keys, SeeView becomes an easy-to-use
interface for many of your daily tasks. SeeView provides an interactive, easy-to-
customize environment for many different uses. System managers, operators,
developers, analysts, and others can use it daily as a command interpreter. The
presentation capabilities of the SeeView product allow it to function in a desktop or
workbench environment, making it a powerful productivity tool.

Scripts
The SeeView product has a programmatic interface that allows users to write SeeView
programs (called scripts). You can write scripts to control window placement on the
screen, assign each window to a process, decide what text is sent to a process,
determine how the output from a process is displayed, and perform many other
functions. You can use these scripts to customize SeeView when first started, or
execute the scripts from a SeeView session that has already been started. For more
information on writing your own scripts, see Section 5: SeeView Language Elements
through Section 9: SeeView Statements and Script Symbols.

Features
SeeView provides:

 Equipment independence: SeeView does not require any special equipment. It
runs equally well on HPE 6530 terminals and PC, UNIX, and Macintosh
workstations using HPE and third-party terminal emulation software.

 Program Persistence: When a terminal or workstation is powered off or rebooted,


you normally lose your session context and all host programs that had the

HPE NonStop SeeView Manual Page 24 of 365


workstation open. However, if your sessions are activated through SeeView, they
remain active even if the workstation is rebooted or powered off and on. You can
then reestablish contact with these programs when you reconnect. SeeView also
allows you to move your SeeView sessions from one device to another (even at a
remote location) through the use of the SEEDIT CONNECT command.

 Quick Access: By enabling you to run many programs concurrently, the SeeView
product drastically reduces the overhead caused by repeated process creation and
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. The SeeView program allows you to scroll through the text displayed in a
window; for example, to review old output from a process. This effectively gives
each process its own workstation, while allowing you to select which part of the
output from a process is to be displayed at any time. You can also scroll text from
side-to-side to display process output that is wider than the window.

 Context Switch: By making use of the multiple pages of memory internal to the
workstation, the SeeView product allows you to keep windows on terminal pages
that are not displayed. By keeping these windows in the actual workstation, the
program lets you switch back to one of these windows quickly. Press a function
key to display the desired window. This allows context switches to occur in a few
milliseconds and significantly reduces the number of input-output (I/O) bytes
required to redisplay a window (up to 500 times).

 I/O Savings: When multiple windows appear on the same page, the SeeView
program updates all windows on the screen in a single I/O. By blocking multiple
line-at-a-time I/Os into a single I/O, the program greatly reduces the number of I/O
operations. Compared to a process performing line-at-a-time I/O, the SeeView
program can reduce I/O messages up to 20 times, a significant savings when
applied to functions that can produce hundreds of lines of output, such as SCF
LISTDEV or TACL PPD commands.

 Command History: SeeView keeps a command history for every process running
in the SeeView environment. This allows you to recall commands for reexecution
or simply review commands entered for a process. You can modify commands
before reexecution, simplifying the rekeying of commands that are similar. Using
the command history allows you to easily correct mistakes.

 Block Mode: Although the display device or workstation is operating in block
mode while the SeeView program is using it, the processes whose output appears
in SeeView windows must be conversational processes using the common

HPE NonStop SeeView Manual Page 25 of 365


Interactive Text Interface (ITI) protocol. Thus, any program you want to run in a
window must write its output one line at a time and expect its input one line at a
time. Most utilities for NonStop systems use the ITI protocol. The Subsystem
Control Facility (SCF), EDIT, Enform, FUP, Peruse, PUP, SQLCI, and TACL are
some examples. The compilers, COBOL, DDL, Pascal, and TAL, also use the ITI
protocol.

 Running External Programs: You cannot run a block-mode process in a


SeeView window, but you can start one from the SeeView program. The SeeView
program gives up its control of the workstation to an external block-mode process,
such as TEDIT or a Pathway application, just as TACL does. When the process
terminates and the SeeView program regains control of the workstation, SeeView
automatically rebuilds the previous environment.

 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). When you create a task
(either from a menu selection or through a SeeView command), SeeView builds a
Task Control Block (TCB) to keep track of attributes specific to the task. SeeView has
a limit of 4096 TCBs, which means you can run up to 4096 processes in your SeeView
environment. SeeView stores the output in a cache.

Window
A window displays the output of a task (process), or equivalently, the contents of a
task‟s cache. SeeView allows you to have a total of 128 windows in your environment.
Because you can have up to 4096 tasks, some tasks are not assigned to a window.
You can assign windows to the task whose output you want to display. You can have
the output from several tasks displayed in the same window, you can have several
windows displaying output from the same task (perhaps at different locations in the
cache associated with the task), and you can copy text displayed in any window for
use elsewhere in your SeeView environment (for example, as input to another task).

Sill
You generally cannot modify the display area of a window, but you can enter
commands at the bottom of a window. This area is called the sill. When you press

HPE NonStop SeeView Manual Page 26 of 365


Return and the cursor is on a window's sill, the text up to the cursor position is sent to
the task assigned to the window (such as TACL or FUP).

Cache
When you send a command to a task by entering it on the sill of a window assigned to
the task and pressing Return, the SeeView program sends the command to the
process and waits for a response. The response to your command is then displayed in
the current window and also stored in a cache, managed by the SeeView program.
Caches are similar to large arrays that can be accessed by read and write operations
via indexing. They are linearly linked, sequential lists of strings containing menu items,
data, or commands.
By storing output in cache memory, the SeeView program enables you to scroll back to
look at old output. Because each task generally has its own cache, you have a record
of your work with each task. Two tasks can share a cache when one task starts
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. When the
cache fills up, the oldest lines in the cache for the task are lost, and new lines reuse
their space. In this way, a cache always contains the most recent output for that task.
In many ways, the SeeView program acts as a cache manager. When the SeeView
program receives output from a task, that text is stored in a cache. The program keeps
track of which tasks are associated with which cache and stores output in the
appropriate location. A window displays the output stored in a cache. The sill of a
window provides a place to enter new commands for the process (task) associated
with the cache displayed in the current window.

Scroll
You can display any text that is in a task‟s cache in a window (or several windows).
Once a window is created and assigned to a task, you can scroll through the text in the
window to display the area of interest by pressing function keys. You can scroll
vertically or horizontally within a window. Scrolling horizontally displays lines of text
that are too wide for the current window size.

Scripts
SeeView provides a command language for customizing environments and defining
menu actions in command files called scripts. Scripts are EDIT files containing
statements in the SeeView script language that are executed in response to some
action on your part (such as making a menu selection).

HPE NonStop SeeView Manual Page 27 of 365


Shell
The standard SeeView environment is contained in an automatically invoked script
called the shell. If you specify an IN file when you start the SeeView program, the
program invokes that file as the shell. If you do not specify an IN file, the program looks
on the current subvolume for a file called SeeShell and invokes that file. If this file is
not present, the program looks in the same subvolume as the SeeView object file for a
SeeShell file.

External Scripts
The standard shell also allows you to access external scripts that are not part of the
environment set up by the shell. You can access them through a shell menu or by
explicit commands.

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. The program also uses the Help page for several other purposes, such as
displaying status information and developing scripts.

User Pages
Available pages within a workstation are called user pages. You can display the
windows you need. A 6530 terminal has 7 user pages, and a 6526 terminal has 12
user pages.

SeeView Help
The SeeView product comes with extensive help facilities. For example, to get general
help, type HELP NEW USER from any window sill and press Shift-Return or Return
from the sill of a free window. The first page of help displayed after you type HELP
NEW USER at a window sill:

HPE NonStop SeeView Manual Page 28 of 365


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.

HPE NonStop SeeView Manual Page 29 of 365


Help on SeeShell Menus and Menu Items
You can often get context-sensitive help on a SeeShell menu or menu item by placing
the cursor on a menu or a menu item and then pressing Shift-Return. This example
shows the context-sensitive help for the Backup command in the System Utility menu
of the standard SeeShell:

HPE NonStop SeeView Manual Page 30 of 365


Section 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.
You can run many programs within the SeeShell, including:

 HPE Tandem Advanced Command Language (TACL)


 File Utility Program (FUP)
 Peripheral Utility Program (PUP)
 Backup and Restore
 System Control Facility (SCF)
 Peruse
 PSMail
 SQL Conversational Interface (SQLCI)
SeeShell lets you invoke, through menu selection, other shells containing user-defined
menus and procedures written in the SeeView scripting language. This section
explains how to use these standard SeeShell menus:

Each of the first three menus, System Devices, System Utility, and SeeView Extras, is
covered in a separate subsection. The last three items, Network SeeNet, Site SeeLocl,
and User SeeCstm, are discussed in the subsection Custom Shells. These last three
customized menus will appear differently on your system.

HPE NonStop SeeView Manual Page 31 of 365


The illustration for each example in this section shows what the terminal screen
displays under the conditions described. In the screen illustrations, a box (representing
the cursor) to the left of a menu item indicates that the item is selected.
Note. For help on most menus or menu items in the SeeShell, select the desired menu
or menu item and press Shift-Return.

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.
When you select System Devices on the SeeShell main menu, the SeeView program
displays the Devtypes menu, which lists a number of system peripheral device types:

When you select an item on the Devtypes menu, you get system information about that
device type. Table 2-1 briefly outlines the commands available from the System
Devices menu. This subsection gives examples of some of the menu items on the
System Devices menu.

Table 2-1. System Devices Menu Commands


Command Default All Functions Description
Function
Disc LISTFREE, H DISC REPORT Allows you to obtain
LISTDEV information on discs
LISTCACHE connected to your system
LISTCACHE, STATISTICS and to perform specified
REFRESH functions.
REVIVE
LISTFREE, H
Printer DEV, STATUS DEV, STATUS Allows you to obtain the
status of printers on your
system.
Tape LISTDEV LISTDEV Allows you to obtain
UP information on tape devices
DOWN on your system and to
LAST LISTDEV perform specified functions.

HPE NonStop SeeView Manual Page 32 of 365


Expand STATS, LINE STATS, LINE Displays Expand names on
your system.
Comm SELECT? TERM PROC Allows you to obtain
ATP 6100 information on the data
CP6100 communication devices on
SNAX your system.
X25
LAN

Obtaining Disk Information


For information about any disk on the system, select Disc on the Devtypes menu.
SeeShell displays a menu that lists the disk drive names on the system. For example:

If the list is too long to fit on the page, press NEXT PAGE (with the cursor in the
window listing the drives) to see additional devices.
The default action for disk devices on the D-series and earlier NonStop operating
systems is to execute a PUP LISTFREE HISTOGRAM command, producing a list of
free space on the selected disk. (The heading reads “LISTFREE,H”.)
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.

HPE NonStop SeeView Manual Page 33 of 365


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.

When you select one of the listed commands, the device name menu reappears with
the new command at the top.
For example, when you select the command LISTCACHE, that command appears at
the top of the device name menu:

HPE NonStop SeeView Manual Page 34 of 365


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.
In the next example, if you select the disc $SYSTEM, the LISTFREE command
displays a DISK FREESPACE HISTOGRAM for the selected disc device in a window
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.

HPE NonStop SeeView Manual Page 35 of 365


Obtaining Printer Information
When you select Printer on the Devtypes menu, SeeView displays a menu listing the
printer device names on the system. For example:

The printer device name menu does not contain the Command? option. The
DEV,STATUS command at the top of the menu is the only command you can invoke
for any of the printer devices listed.
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. For example, enter the
following command to get information on the collector‟s name and status:
collect $s,status

HPE NonStop SeeView Manual Page 36 of 365


Obtaining Communications Device Information
For information about the data communications devices on the system, select Comm
on the DevTypes menu. SeeView displays a menu that lists the data communications
device types on the system:

For the items on the communications device types menu, SeeShell works in a manner
similar to that described under Obtaining Disk Information on page 3333.

System Utility Menu


The System Utility menu provides access to a number of HPE subsystems and utilities,
from basic command interpreters such as COMINT or TACL to complex menu-driven
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 outlines the
commands available from the System Utility menu.

HPE NonStop SeeView Manual Page 37 of 365


Table 2-2. System Utility Menu Commands
Command Default All Functions Description
Function
Files Fileinfo View Allows you to obtain file
Clear information on files in your
GIVE current subvolume or a
INFO, DETAIL specified subvolume.
LISTLOCKS
LISTOPENS
LOAD
LOADALTFILE
LICENSE
REVOKE
PURGEDATA
PURGE !
COPY
DUP
INFO
RENAME
SECURE
EDIT
Files * Fileinfo Same as functions for Files Allows you to operate on
multiple files and to select
files from available volumes
and subvolumes to perform
file operations.
Backup Backup Backup Allows you to back up a
TACL subvolume or single file. You
can use the lower TACL
window for running Tapecom,
to check for Mounts, and to
accept a tape mount request.
Comint None Any Comint commands Gives you a Comint
command interpreter.
Menuflip None None Allows you to switch the
order of the System Devices
and System Utility menus.
Netmon PROBE PROBE SYSTEM Displays network nodes in
SYSTEM PATHS the current network. You can
MAPS perform Network Monitor
STATS commands.

HPE NonStop SeeView Manual Page 38 of 365


Pathway None. Asks PM Allows you to perform various
for process Pwy operations on objects in a
ID of a Pgm Pathway system.
PATHMON Trm
process. Tcp
Srv
Pm?
Restore Restore Restore Allows you to restore a
subvolume or file from tape.
Spooler Spool Job Allows you to perform spooler
Col operations.
Dev
Loc
J*
TACL TACL Any TACL commands Starts TACL and opens a
window on it. A complete
command history is
maintained and is scrollable.
Run Run Run Allows you to run a program.
When you enter the name of
a program and press Return
or Enter, SeeView gives up
control of the terminal and
runs the specified program.
When the program stops, it
redisplays the current
environment.

Performing File Operations


To perform various file operations, select Files on the System Utility menu.

HPE NonStop SeeView Manual Page 39 of 365


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. This menu lists the names
and codes for the files in the specified subvolume:

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.

HPE NonStop SeeView Manual Page 40 of 365


The three menus below the Selected File window list the options that you can perform
on the file shown in the Selected File window. You can scroll to the rightmost options
menu to display additional options.
Once you select a file, you can perform any of the operations listed on the three menus
at the bottom of the screen by selecting the option you want.
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 5555.) Otherwise, the file appears on the current terminal
page.
For example, if you select Seedit on the Editor? menu, SeeShell loads a copy of the
selected file, DOC2, into the Seedit window and automatically enables Edit mode:

HPE NonStop SeeView Manual Page 41 of 365


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.
With multiple-file mode enabled, you can select any number of file names in the
Fileinfo menu. In this example, the files DOC2, DOCUMENT, and FRONT are

HPE NonStop SeeView Manual Page 42 of 365


selected. As you select the files, their fully qualified names appear in the Selected Files
window directly to the right of the Fileinfo menu.
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.
As in single-file mode, the three options menus below the Selected Files window
provide options that you can perform on all the files displayed in the Selected Files
window.
Selecting any of the items on the options menus performs the corresponding operation
on the selected files.
For example, if the DUP option is selected, SeeView displays a prompt:
To fileset.* [ ,options ]

HPE NonStop SeeView Manual Page 43 of 365


You can enter the volume and subvolume to which you want the selected files
duplicated; for example, $SYSTEM.SEEDOCS.*.
Once you enter the destination for the DUP command (or another command), the View
window is replaced by the Tacl window, which displays the results of the selected
command:

HPE NonStop SeeView Manual Page 44 of 365


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. If labeled tape
support is enabled, you can use the lower TACL window to run TAPECOM, to check
for mounts, and to accept the tape mount request.
Once the tape is mounted, the BACKUP window displays the ongoing status of the
back-up operation.
Selecting Pathway from the System Utility menu allows you to perform various
operations on the objects in a Pathway system.

HPE NonStop SeeView Manual Page 45 of 365


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.
If you select PM from the Pathway options menu, the SeeView program displays the
Pathcom window. This window shows the output from a STATUS PATHMON
command:

If you select Trm (terminal) from the Pathway options menu, SeeShell displays a list of
Pathway terminal IDs in the STATUS,DETAIL window.

HPE NonStop SeeView Manual Page 46 of 365


This window label indicates the command that will be executed when you select a
terminal name from this menu. To change the command, select the Command? item
on the menu:

If you select the first item from the STATUS,DETAIL menu, SeeView displays the
output from a PATHCOM STATUS DETAIL command in a window below the terminal
ID menu:

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:

HPE NonStop SeeView Manual Page 47 of 365


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. For example, if you select the first terminal
listed on the menu, SeeView displays the Pathway statistics for that terminal in a
Pathcom window:

Performing Spooler Operations


The Spooler option on the System Utility menu can help you perform a number of
spooler operations:

HPE NonStop SeeView Manual Page 48 of 365


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.

The heading at the top of the spooler job window indicates the current command,
JOB,STATUS, for any of the spooler jobs listed. To change the current command,
select Command? in the spooler jobs window.
If you select job 42, the SeeView program displays information about that job in a
Spoolcom window.:

HPE NonStop SeeView Manual Page 49 of 365


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.
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.

HPE NonStop SeeView Manual Page 50 of 365


SeeView Extras Menu
The SeeView Extras menu enables you to customize certain display options for your
terminal, set up and configure a SeeView environment, access the Help Page, and
retrieve information about your SeeView process and the tasks in your environment.
These functions allow you to:
 Modify the color or video characteristics of windows and menus.
 Configure terminal pages with windows on different user programs.
 Add external menus and procedures to the SeeView environment.
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.

Table 2-3. SeeView Extras Menu Commands


Command Default All Functions Description
Function
Color None ColorShow Allows you to alter the color or
Video ON video characteristics of
T6526 SeeView windows and menus.
T6530
T6540
MAC
Video OFF
ColorSet
ColorReset

HPE NonStop SeeView Manual Page 51 of 365


Config None Task configuration menu Allows you to declare user
programs (called tasks) and
create windows on these
programs.
External None Add Allows you to “clip” user-defined
Delete menus and procedures into the
Cleanup current SeeView environment.
Filenames
Load
Save
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.
Intrinsic None Any #intrinsic Displays a list of built-in
SeeView # intrinsic names and
their values.
Pagelist None None Displays each page of the
SeeView environment.
SeeShell None None Displays the current SeeShell
source. You must invoke
FastShell before you can obtain
the current SeeShell source.
Status Status Status Displays the current status of
the SeeView processes.
TprBuild None None Saves diagnostic information
about the environment to an
EDIT file.
Version None None Displays the version date of the
current SeeShell.
Window None Any SeeView statement Displays a free window so that
you can enter SeeView
statements such as HELP,
OPEN, or STATUS.
Users None None Displays the current SeeView
users on one or more systems.
You must enter the system
name desired with no
backslash (\).

HPE NonStop SeeView Manual Page 52 of 365


Goodbye None None Logs you off the environment.
To log on, enter HELLO and
press Return. Then log on as
you would normally do.

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.

ColorShow displays a menu list of video attribute combinations available for a 6500-
series terminal, as shown in the next illustration.
Video ON causes 6500-series video attributes, rather than alternate graphic
characters, to be used in framing all SeeView windows and menus. This option
reduces by about 50 percent the amount of I/O needed to draw a window.

HPE NonStop SeeView Manual Page 53 of 365


T6526, T6530, T6540, or MAC produces Video ON highlighting for the specified
terminal type regardless of the terminal type that SeeView currently has open.
Video OFF causes SeeView to use alternate graphic characters to draw window and
menu frames.
The following menu appears when you select ColorShow. ColorMenu lists all video
attribute combinations available for a 6500-series terminal. Each line of the menu
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.
The menu that appears when you select a line on the ColorMenu has a heading that
indicates the line number to be reconfigured.
To change the background color for the specified line, select the new color on the
second menu. To change the foreground color, you move the cursor so that it overlaps
any letter of the name of the desired color and then press Return.
In this example, the colors for Line 1 are changed to white background and black
foreground.

HPE NonStop SeeView Manual Page 54 of 365


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.

HPE NonStop SeeView Manual Page 55 of 365


vst2-57.vst
To specify a list of programs for a given terminal page, type the program names on the
menu line for a given page and separate them with semicolons.
For example, type FUP; SCF; CUP; on the menu line for terminal page 7 and press
Return to declare three task IDs named FUP, SCF, and CUP. Once these programs
are started, SeeView displays a window for each process on terminal page 7.
You can specify any task option outlined in Section 9: SeeView Statements and
Script Symbols for the task configuration menu. For example, consider the text that
appears on the menu line for terminal page 3. In the first task specified, := seedit
equates the SeeView utility program Seedit to a taskid label of SEEDIT1. Onobjvol
specifies that 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.
To move quickly from one terminal page to another, use the F1, F2, SF1, and SF2
function keys, as described in Table 3-1.Error! Bookmark not defined.
As the preceding illustration shows, the specification for terminal page 3 calls for
SEEDIT1 and TACL tasks to be declared. This specification starts each process,
displays terminal page 3, and builds a window on each program:

HPE NonStop SeeView Manual Page 56 of 365


To interact with either of these windows directly, move the cursor to the sill of the
window, enter commands, and press Return.
For example, enter the Seedit command GET $THIRD.MM.DISCS from the sill of the
SEEDIT1 window for a display like the one in the next illustration. For this example to
work, the selected file must exist.

Editing a File
When a Seedit GET command is executed, the contents of the specified file appear in
the current window. For enable edit mode for that window, press the Insert-Line key or
F5.
When you enable edit mode for a window, an advisory message appears in the
heading of the window and on line 25.
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.
The following example shows the window containing the file $THIRD.MM.DISCS ready
for editing. The heading at the top of the window changed from SEEDIT1 to the name
of the file ($THIRD.MM.DISCS) and the words in SEEDIT1. Also, a double line
appears at the top of the window.

HPE NonStop SeeView Manual Page 57 of 365


vst2-59.vsd

Executing External Script Files


Select External on the SeeView Extras menu to allow user-defined menus and
procedures to be clipped into the current SeeView environment. This function lets you
customize the External menu to suit your work environment.

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:

HPE NonStop SeeView Manual Page 58 of 365


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. When you respond to the
“Script filename:” prompt, SeeView displays a menu below the prompt, as the next
illustration shows.
The menu that appears below the “Script filename:” prompt lists a number of options
for manipulating the External menu:

The menu options perform these functions:


Add Adds the specified script filename to the External menu.
Delete Deletes the specified script filename from the External menu.
Cleanup Deletes all script filenames from the External menu.
Filenames Displays the fully qualified filename of each External script.
Load Loads the External menu from the EDIT file named SEECONFX.
Save Saves the External menu to an EDIT file named SEECONFX.
If you select Add, for example, SeeView redisplays the External menu with the name of
the specified script file added to the menu (DISCS in the preceding example.)

HPE NonStop SeeView Manual Page 59 of 365


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.
The next three menus, Network SeeNet, Site SeeLocl, and User SeeCstm are
examples of menus that you or your system manager might want to provide for your
system. The first, Network SeeNet, provides a menu of HPE network performance
information. Beginning with the C30.09 RVU, the SeeNet script is not part of SeeView,
but is distributed as part of the Network Statistics Extended (NSX) product. The
SeeNet script provides access to various graphic reports generated by NSX. If your
site is not on a network or does not use NSX, this menu can be replaced with one
providing functions more specific to your system.
You can customize your environments with three separate, locally maintained SeeView
files named SEENET, SEELOCL, and SEECSTM. This arrangement allows the rules
that define the SeeView environment to be contained in the SEESHELL, SEELOCL,
SEENET, and SEECSTM files and in any external files that they referenced. None of
these rules reside in the SeeView program object file.
Follow these guidelines for organizing the SeeView custom shell files referenced by
the standard SeeShell.

HPE NonStop SeeView Manual Page 60 of 365


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.

SEELOCL
The Site SeeLocl menu provides an example that your site can customize for its own
use. Your local site or system management should maintain the SEELOCL file. As
provided by HPE, the Site SeeLocl menu provides an interface to an electronic mail
system (PSMAIL) and access to a number of other common utility functions.
Follow these guidelines:
 SEELOCL is meant to provide common local site functions.
 The SeeView program searches for the SEELOCL file on the SeeView object file
subvolume.
 The contents of the SEELOCL file in the SeeView installation subvolume are an
example only.

SEECSTM
This menu provides a place for you to put your own personal SeeView functions. It is
easy to find utilities or functions you access frequently, such as access to a calendar or
phone list. Unlike the SEESHELL, SEENET, and SEELOCL files, the script file for this
menu should be located on the current volume and subvolume in effect when you start
the SeeView program.
Follow these guidelines:
 Users can create their own SEECSTM files.
 SeeView searches for SEECSTM on the currently invoked default subvolume.
(For more information on this item, see the ALTER INVOKEVOL statement and
the #VOLSUBINVOKE intrinsic.)
 The contents of the SEECSTM file in the SeeView installation subvolume are an
example only.

HPE NonStop SeeView Manual Page 61 of 365


Section 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] [,option ] /


[ statement ]

NAME [pid]
specifies the process name of the SeeView program.
The SeeView program must be named.

IN file
specifies an alternate SeeView shell input file.

OUT file
specifies the terminal that the SeeView program will open.

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.

HPE NonStop SeeView Manual Page 62 of 365


Exiting the SeeView Program (SF16)
To exit the SeeView program, press SF16. The SeeView program displays a warning
message saying that all SeeView activity will stop and prompts you to press SF16
again if you want to exit.
You can exit the SeeView program at any time provided you do not have any open
windows that are in edit mode. The SeeView program does not let you exit if an edit-
mode window is open, and the program displays a warning message to that effect.

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.

Getting Around in the SeeView Program


This subsection explains how to navigate through the SeeView program by using the
function keys. It includes:

 Selecting Menu Items (Return)


 Accessing the Help Page (F14)
 Recovering a Terminal Display (SF14)
 Interacting With Windows
 Displaying Text Within Windows
 Sending Commands (Return, Shift-Return)
 Responding to Prompts
 Displaying Different Terminal Pages (F1, F2, SF1, SF2)
Note. You can use a VS editor template with the SeeView program to provide a guide to
how function keys work in the SeeView environment. The VS functions keys are similar
to the SeeView function keys, but they are not identical. Alternatively, you might want to
use a blank keyboard template and customize it for SeeView program use.

HPE NonStop SeeView Manual Page 63 of 365


Selecting Menu Items (Return)
To select an option from any menu, move the cursor to the item and press Return. You
can use the following keys to move the cursor:
Keys Moves the Cursor
Arrow keys Up, down, left, right
Tab To the next field
Home To the field in the upper left corner
Shift-Home To the field in the lower right corner
(End key on PC)

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. For a brief summary of function key use, press
Next Page. To obtain further help on any of the topics listed (mostly commands from
the SeeView programming language), enter HELP topic (for example, HELP F1) on
the sill of the window displaying the help topics (where topic is the name of the item
you want more help with) and press Return.
F13 also uses the Help page is F13. F13 displays a status list of all tasks that are
running and some information about each one:

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.TELE
SEEDIT1 ~ 1,132 $Z279 0/100 60,15 $SYSTEM.SYSTEM.SEEDIT
SEEDIT2 ~ 1,141 $Z280 120/200 60,15 $SYSTEM.SYSTEM.SEEDIT
* 1,128 $Z269 257.61 \CHICAGO.$SYSTEM.SYSTEM.Seeview
--------------------------------------------------------------------------
Tasks: 24/512 Cache:1971/16384 Cachefile: $mm (extensible)
Symbols: 56/512 Procs: 60/512 Pooluse: 0/24 (187/187)
Sysmsgs: 11387 Umsgs: 6783 Started: 2/9/95 10:26 AM
User : CENTDIV.MIKE 66,1 Current: 2/9/95 4:40 PM
--------------------------------------------------------------------------

For a complete description of this display, see HELP STATUS. For each task,
SeeView displays the CPU, PIN, process name, and object file. The CachePg column
shows how many pages of cache are used and allocated for the task, and Timeout
shows how many seconds SeeView will wait for output from the task while processing
a script.

HPE NonStop SeeView Manual Page 64 of 365


The line with an asterisk (*) in the Taskid column gives information about the SeeView
program itself. The timeout value reported in this line is the total number of CPU
seconds that SeeView has used since being started.

Recovering a Terminal Display (SF14)


Another function key you might need to use occasionally is SF14, the recover key. If
the data displayed on your terminal becomes corrupted due to a terminal error (for
example, turning it off) or communications problems (modem errors), SF14 causes
SeeView to rebuild all the windows on all the terminal pages.

Interacting With Windows


The SeeView program allows you to create windows on various terminal pages.
Windows permit direct communication with either user-defined tasks or the SeeView
interpreter. The physical components of a window appear in Figure 3-1.

Figure 3-1. Window Components

vst3-66.vsd

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.
Many SeeView statements entered from a free window result in data being displayed
in (or cleared from) that window. For example, CLEAR clears window area, STATUS
displays user task status, ALTER displays current option settings, and HELP displays
specified help.
It is sometimes useful to use the Help page as a place to enter these statements so
that you can later reference (for example, HELP for a statement that is being used or

HPE NonStop SeeView Manual Page 65 of 365


ALTER for an option that is being changed). Any text on a window sill can be copied,
retrieved, or scrolled.

Assigned Windows
A window with a heading is an assigned window. When a window is assigned to a
task, you can communicate directly with the task by placing one or more statements on
the sill of the window and pressing Return. Any messages displayed in the window
during such communication are saved in a message cache associated with the user
task.
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. Each line of text in a
menu window, even if it consists of a single character, represents a user-defined
function that you can invoke by moving the cursor to the corresponding line and
pressing Return.
A line of text in a menu cache is said to be a menu production if that line contains a
production symbol (<==). In a menu production, the text to the right of the production
symbol is interpreted as SeeView language statements. The text to the left of the
production symbol is the text that actually appears in the menu window.
Menu windows can also have a default production associated with them. When a
menu has a default production defined for it, this production is invoked if a line of text
in the menu does not contain a production symbol.

Windows and Window Sills


You can interact directly with any window that has a sill at its base. These windows do
not have a line across the bottom. In Figure 3-2, the window labeled PUP has a sill.
The window sill is located on the line marked X.

HPE NonStop SeeView Manual Page 66 of 365


Figure 3-2. SeeView Window With Sill

Vst301

To interact with a window, enter commands on the sill. Move the cursor to the sill,
typing one or more commands, and press Return. When you press Return, the text
from the beginning of the line up to the cursor position is entered.
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.

Moving Between Windows


You can use many function keys when interacting with windows, their tasks, and the
SeeView program. Use the Tab key (and Back-Tab) to move the cursor from one sill to
another on the same terminal page (and F1 or F2 to change terminal pages). The
Home key moves the cursor to the first window on the current page, and Shift-Home
moves it directly to the last.

Cursor Arrow Keys


You can also use the cursor arrows to move the cursor between windows or along the
sill of a window to edit the text entered on it. While editing text, you can also use the
Char Del or Char Ins keys to delete or insert characters in the middle of a command on
the sill.

HPE NonStop SeeView Manual Page 67 of 365


Displaying Text Within Windows
To view more text than a window or menu can display at one time, you can scroll up,
down, left, or right through the text.
To scroll through the text in a window, use the following function keys:
S-Roll Down Moves the text down by one-third the height of the window.
S-Roll Up Moves the text up by one-third the height of the window.
Prev Page Displays the previous page of the text in the window.
Next Page Displays the next page of the text in the window.
S-Prev Page Displays the first page of the text in the window.
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). If the cursor is in column 20
of the current window, the text is moved to the right by 20
characters.
SF13 Moves the text to the left 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 left by one character (unless the text is already all
the way to the left). If the cursor is in column 20 of the current
window, the text is moved to the left by 20 characters. The
location of the cursor defines the new left edge of the text in
the window when you press the function key.

Scrolling Vertically (Roll Up, Roll Down)


You can scroll text within a window one line at a time by pressing the Roll Down or Roll
Up function keys. Hold down the Shift key while pressing Roll Down or Up to scroll the
text in the window by one-third of the window height.

Scrolling Horizontally (SF12, SF13)


You can also scroll the text in a window horizontally (from side to side) to display text
that is wider than the window. To scroll the text in a window to the left (and display text
beyond the right edge of the window), move the cursor on the sill the amount you want
to scroll. (For example, if you want to display nine characters beyond the right edge,
move the cursor nine characters in from the left edge of the sill.) Then press SF13.

HPE NonStop SeeView Manual Page 68 of 365


When scrolling text to the left, the column the cursor is in when you press SF13
becomes the new left edge of the window. To scroll text to the right, press SF12.

Sending Commands (Return, Shift-Return)


The Return key sends commands within the SeeView environment. Once you select a
terminal page and move the cursor to the window you want to interact with, use the
Return key to send commands to the SeeView program or to the task associated with
the current window. Type text on the sill of a window and press Return to send all of
the text up to the cursor to the task associated with that window (or directly to SeeView
if no task is associated with the window). When you press Return on a sill, only text up
to the cursor is sent, so make sure the cursor is at the end of any text you want sent.
You also use the Return key to make menu selections. Move the cursor to an item in a
menu and press Return to select that item and cause the SeeView program to execute
any commands associated with it.
If you are in a window assigned to a task but want to send a command to SeeView
rather than to the task, you can send a command by entering the command on the sill
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.

Moving to the End of the Line


Once your command is ready to submit, move the cursor to the end of the command
before you press Return. One quick way to move the cursor to the end of the text on a
sill is to press Control-Return. (Hold down the Control key while pressing Return). The
cursor moves directly to the end of the text on the current line. (This works when a
6530 or 6526 is in block mode, not just in the SeeView program.)

Moving Through the History Cache


When you press Return on a sill, the command you entered is sent to the task
assigned to the window whose sill the cursor is on. At this time, SeeView saves the
command into a command history cache so that you can later retrieve the command to
reexecute it (or edit the command and then resubmit it). To access this history cache,
place the cursor on the sill of a window and press F3 or F4 to scroll through the history
cache. F3 scrolls backwards, and F4 scrolls forward.
You can set the total size of the history cache when you start SeeView, the history
cache is shared between all your tasks. To jump directly to the oldest entry in the
history cache for a particular task, press SF3 with the cursor on the sill. To display the
most recent entry in the history cache for a task, press SF4.
The command history feature provides the equivalent of TACL FC (Fix command) and
HISTORY commands for all your tasks, not just those that support it.

HPE NonStop SeeView Manual Page 69 of 365


Type Ahead
SeeView displays only the first window of text from a command even if that command
generated more lines of response than fit in a window. For example, a PPD command
to TACL almost always produces many lines of output. When you enter a PPD
command at a TACL window, only the first part of the response appears. You must
press NEXT PAGE to see more. You can start entering your next command at any
time without waiting for the PPD command to finish sending all of its lines to SeeView.

EOFSEEK
You can have the SeeView program automatically scroll ahead. You can enable this
feature, called automatic end-of-file seek, on a window-by-window basis. To enable
and disable it, press the Shift-Del Line function key. (This key may be difficult to find on
some emulators. It is equivalent to Ctrl-Del with PCT.) Once you turn on end-of-file
seek, SeeView displays a window of text, pauses for a short period, automatically
displays the next lines in cache appears, and repeats this behavior until the last line in
cache is displayed. To disable Eofseek at any time, press Shift-Del Line again.

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. The output from the command processed by
SeeView appears in the current window and is also saved in the cache associated with
that window.
For example, if you move the cursor to a TACL window, enter HELP, and press
Return, you see the output of a TACL HELP command in the window. Now enter HELP
again (or move the cursor to the end of the HELP command already on the sill) and
press Shift-Return. Some SeeView HELP text appears in the TACL window. Scroll
through the text in the window, and you will see that the output from both HELP
commands is now in the TACL cache.
You can enter any SeeView command (such as OPEN or STATUS) at any sill in this
manner. Press Shift-Return to send the command to SeeView instead of the task
assigned to the window.

Responding to Prompts
When you select certain menu items in SeeShell, a prompt appears, on the screen.
When a prompt appears, it can include a default command. For example, this
illustration shows a prompt with a default command for a tape backup operation:

HPE NonStop SeeView Manual Page 70 of 365


To respond to the prompt, either:

 Accept the default by pressing Return


 Edit the text in the prompt as necessary and then press Return
You edit the text in a prompt in the same way as text on a window sill. For a prompt,
however, pressing Return enters the entire input field, not just the characters up to the
cursor position.

Displaying Different Terminal Pages (F1, F2, SF1, SF2)


The HPE 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. (See Figure 3-3.)

HPE NonStop SeeView Manual Page 71 of 365


Figure 3-3. SeeView Terminal Pages

SeeView allows you to put different windows on different terminal pages. Use F1, F2,
SF1, or SF2 to select which page is displayed. When you press one of these function
keys, SeeView displays a message on line 25 of the terminal to tell you which page is
now displayed.

 F1 displays the previous user page. When page one is displayed, F1 takes you to
the last user page.

 F2 displays the next user page. From the last page, F2 displays page one.
 SF1 always displays page one.
 SF2 displays the last (highest numbered) user page with a window on it.

Message Caches
Free windows share a common message cache. You can use any free window to
display free window messages. All significant messages displayed on line 25 of the
terminal are also stored in the free window message cache.
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.

HPE NonStop SeeView Manual Page 72 of 365


The size of the message cache allocated to a given user task is determined the first
time the task is declared or opened. You can also specify the cache size with the
?MENU directive.
The total number of memory pages available for all message caches is determined at
startup time. You can alter the default of 1024 pages with the startup command
parameter PARAM CACHE. (See Appendix A: Running the SeeView Program.)
If you do not specify the cache size, the remaining free cache pages are allocated
evenly among the remaining task control blocks. The user task status display provides
information regarding cache use.
When a message cache becomes full, buffer space is reallocated in a first-in-first-out
(FIFO) manner, so the most recent messages received from a user task are always
retained.
If a user task is the Seedit editing utility, set the cache to a value large enough to
contain the largest EDIT file that will be in use by that editor. A setting of 100 cache
pages handles typical EDIT files of up to 3000 lines.
You can change the contents of a message cache by using any of the following
operations:

 Communication with the task associated with the cache


 Direct editing of the cache
 SeeView statements that operate on cache (for example, PUSH or POP)

Return Key
Use the Return key to communicate with the entity associated with a given window.
Typing text on the sill of a window and pressing the Return key sends the text up to the
cursor position of the entity associated with the window. The effect of the Return key
operation depends on the type of window.
For a menu window (identified by a heavy- or double-line frame), the menu production
statements associated with the line designated by the cursor are invoked.
For a free window (and not a menu), the text is interpreted by the SeeView interpreter,
and the result appears in the window.
If the window is assigned (and not a menu), the text is sent to the user task associated
with the window, and the task‟s response is displayed in the window. To send text
entered on the sill of an assigned window to the SeeView interpreter rather than to the
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:

HPE NonStop SeeView Manual Page 73 of 365


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. To display the last part of the response, press Shift-Next
Page.

Break Key
The Break key terminates the current SeeView activity. Most commonly, the SeeView
program is waiting for a response from a task that is taking a long time to respond. (For
example, you might have used your TACL task to start a TGAL on a long text file.)
Press Break while SeeView is waiting for a task to respond to a command, SeeView
stops waiting for the response and allows you to perform other activities in your
SeeView environment (such as entering a command in another task's window).
If you press Break while SeeView is executing a script (which can happen because of
a menu selection you made), SeeView stops processing the statements in the script.
If the current activity is the processing of SeeView statements, the Break key halts the
SeeView interpreter and returns control of the keyboard to you.

Configured Timeouts
If the response from a user task exceeds the configured user-task timeout value, a
response timeout occurs, and full control of the keyboard returns to you.
Normally, when you press Return, the keyboard is unlocked immediately so that you
can type ahead while a blinking message on line 25 indicates that SeeView has
initiated your task request. At this point, you can do one of:

 Wait for a response or a timeout


 Type ahead while waiting for a response and press Return again
 Press the Break key and do something else altogether, such as edit a file in
another window or communicate with another process
To display current user-task timeout values, use the status function key F13. You can
alter timeouts by reopening the user task. For example:
OPEN task TIMEOUT nodata timeout,data timeout
The nodata timeout value specifies the number of seconds that SeeView will wait
for the first response from the specified user task. The data timeout value specifies
the number of seconds that SeeView will wait for subsequent messages after the first
message response. You can alter these values globally with the ALTER statement.

HPE NonStop SeeView Manual Page 74 of 365


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.NULL,~NOP
Bracketing with the tilde allows you to mix control and normal characters. For example,
to enter the password control N normal OP:
LOGON NULL.NULL,~N~OP
Also, to generate control Y, which signifies an EOF, in response to a prompt:
~Y
Be careful when using this feature with the CACHEFILTER OFF option of the ALTER
statement. (See Section 9: SeeView Statements and Script Symbols.) Certain
control characters result in values that are illegal in block mode. These characters
might be placed in the user task cache, and subsequent references to this cache might
cause terminal I/O errors. CACHEFILTER is ON by default and prevents this
occurrence.
Use ~RETURN to toggle the BLANKSILL attribute of a window. (See WINDOW271.)

Function Key Summary


Function keys are the primary way to get around the SeeView program. Table 3-1
summarizes the SeeView function key operations for a 6500-series terminal.
Appendix B: SeeView Function Key Reference has a complete function key
reference for SeeView, including a summary of the function key operations for a PC
running a PC 6530 terminal emulator and a detailed description of each function key.

Table 3-1. Summary of Function Key Operations for 6500-Series Terminals

F1 Previous terminal page SF1 First terminal page


F2 Next terminal page SF2 Last terminal page
F3 Back one command SF3 Back to oldest command
F4 Forward one command SF4 Forward to newest command
F5 Insert line or enable editor SF5 Insert free cursor on or off
F6 Delete line or enable editor SF6 Delete window
F7 Retrieve line SF7 Retrieve window

HPE NonStop SeeView Manual Page 75 of 365


F8 Copy line SF8 Copy window
F9 Break window or line (editor) SF9 Define window
F10 Join window or line (editor) SF10 Beep
F11 Return to Help page SF11 Save screen to savefile
F12 Find Text line on sill SF12 Roll right by cursor amount
F13 Status on Help page SF13 Roll left by cursor amount
F14 Help; HELP ALL on Help page SF14 Recover all windows
F15 Tab backwards (word/column) SF15 Execute shell file/cache
F16 Tab forwards (word/column) SF16 Exit or shutdown
Prev Page Prev page window text S-Prev Page First page of text
Next Page Next page window text S-Next Page Last page of text
Roll Down Text one line S-Roll Down Text 1/3 window
Roll Up Text S-Roll Up Text 1/3 window
Insert Line Enable or disable editor Delete Line Eofseek on or off

HPE NonStop SeeView Manual Page 76 of 365


Section 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.
Seedit provides basic commands to display subvolumes, files, and file information on
disk volumes.
To start Seedit from within the SeeView program, either:

 Select Config from the SeeShell SeeView Extras menu


 From the sill of any free window, enter:
OPEN SEEDITx := SEEDIT CACHE 100;
The x in Seedit represents a numeric character such as 1, 2, 3, and so forth.
Once you start Seedit, the commands summarized in Table 4-1 are available. The
Seedit commands are described in detail later in this section.

Table 4-1. Summary of Seedit Commands

Command Description
CONNECT Moves a SeeView process from one terminal to another
FILES Displays a list of files in the specified subvolume
Loads an EDIT file into the current window
GET
HELP Displays help for a Seedit command
INFO Displays file information for the specified file or fileset
MONITOR Monitors a generic log file
MSG Sends a text message to another SeeView user
OBEY Obeys the specified file
PURGE Purges the specified file
RUN Executes the specified program
SEND Sends command to specific SeeView processes
SET Sets Seedit options
SUBVOLS Displays a list of subvolumes

HPE NonStop SeeView Manual Page 77 of 365


SYSTEM Specifies the current system
USERS Displays SeeView users on the specified system
VOLUME Specifies the current default subvolume

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. Once edit
mode is enabled, you can edit the text associated with the window‟s cache or copy
directly with the function keys summarized in Table 4-2.

Table 4-2. Edit-Mode Key Functions

Key Function
F3/F4 Scroll up/down one third of window height
F5/F6 Insert/Delete line at cursor or block if shifted
F7/F8 Retrieve/Copy line at cursor or block if shifted
F9/F10 Break/Join line at cursor
F12 Find text backward/forward on sill [+|-] / text /
F15/16 Word Tab back/forward from current location
PREV-PAGE Previous page of window text (first if shifted)
NEXT-PAGE Next page of window text (last if shifted)
ROLL-UP/DN Roll up/down scroll one line of window text
ROLL-UP/DN Roll up/down shifted scroll one third of window text

The edit-mode function keys are similar to those provided by the HPE EDIT VS virtual
screen editor. Use the VS editor function key template as a guide to all SeeView
function keys. Appendix B: SeeView Function Key Reference contains a detailed
description of each SeeView function key.

Note. Unlike other HPE editors, Seedit edits a copy of the original file, not the file itself.

HPE NonStop SeeView Manual Page 78 of 365


Loading a File
Use the Seedit GET command to load a copy of an EDIT file into a window. Enter GET
filename on the sill of a window that is running Seedit and press Return. For
example:
GET MYFILE
The GET command causes the cache associated with the current Seedit window to be
loaded with a copy of the file MYFILE. Once the file is loaded, enable edit mode,
pressing either F5 or the Insert-Line key. You can then edit the copy of the file directly.
While editing the file in the edit-mode window, you can go to other windows or terminal
pages and converse with other programs or edit other files. You can also copy and
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 edit-
mode 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. Reenabling edit mode permits
subsequent saving of the file.

During edit mode, the only commands accepted on the sill of a window are the SAVE
or ESCAPE statements. Once edit mode is disabled through either of these
statements, you can use any of the Seedit commands.
Note. SAVE is a SeeView statement, not a Seedit command. For information on SAVE,
see Appendix B: SeeView Function Key Reference.

For more information and examples related to edit mode, see the description of the
GET command on page 81.

Seedit Commands
This section describes in detail all the Seedit commands. For each command, the
following information is given:

 Command syntax


 Explanation of the command‟s functions
 One or more examples of how the command is used

HPE NonStop SeeView Manual Page 79 of 365


CONNECT
The CONNECT command moves a SeeView process from one terminal to another in
order to allow moves between geographic locations or to recover from emergency
situations. Once connected, you can return your SeeView process back to the terminal
where it was originally entered. Select CONNECT from the SeeShell Extras menu.

CONNECT $process [TO term ] [HELLO group.user[,password]]

$process
specifies the SeeView process to be moved from its current terminal to the
terminal specified with the TO option.

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.

Considerations

 You can use CONNECT to move the SeeView terminal in cases of failed
communication ports, workstation reloads, or a user move between geographic
locations.

 Moves between different device types might require manual alteration of
FRAMEVIDEO or FRAMEALPHA options for the SeeShell Extras Color option.
Anomalies might also occur when the total number of terminal pages varies from
one device type to another.

 SeeViews operating over dynamic TCP/IP or NetBios windows can be made to
wait indefinitely for reconnections by setting ALTER MODEMWAIT 0 so that
SeeView will not abend on an error 140 (modem error). For more information
about MODEMWAIT, see HELP PARAM.

Examples
This example causes the SeeView process name $SEEV to connect to the terminal
where the Seedit CONNECT command was entered.

HPE NonStop SeeView Manual Page 80 of 365


CONNECT $SEEV HELLO group.user

FILES
The FILES command displays the names of files contained in a subvolume starting
with the specified file, file set, or generic name set.

FILES [ \system. ] [$volume.] [ subvolume ] [ fileset ] [ * ]

system
specifies a valid system.

volume
specifies a valid volume. When you specify a volume or subvolume, it becomes the
new default volume for the Seedit task.

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.* { show all files in subvolume X
FILES X{ show files from X upwards
FILES X*{ show files beginning with the letter X

GET
The GET command loads the specified EDIT file into the current window. To enable
edit mode for a window, press F5 or the Line-Insert key. You can then edit the copy of
the file in a manner similar to that of the HPE VS editor.

GET filename [ ! ]

HPE NonStop SeeView Manual Page 81 of 365


filename
specifies a valid EDIT file.

!
creates an EDIT file named filename if it does not already exist.

Considerations

 For information about saving files, see SAVE on page 243243.
 You can also append information to a file that has been loaded into a cache. To
append information from a file to a cache, use the LOAD statement:
LOAD file-name, cache-id

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.

HPE NonStop SeeView Manual Page 82 of 365


Example
The following example demonstrates the HELP command:

HELP FILES
HELP GET

INFO
The INFO command displays file information for the specified file, file set, or generic
file name set.

INFO [ \system.] [ $volume.] [ subvolume.] [ fileset ] [ * ]

system
specifies a valid system name.

volume
specifies a valid volume name. The volume you specify becomes the new default
volume for the Seedit task.

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 all files in default subvolume


INFO X.*{ info all files in subvolume X
INFO X{ info files from X upwards
INFO X*{ info files beginning with the letter X

HPE NonStop SeeView Manual Page 83 of 365


MONITOR
The MONITOR command monitors the specified text log file and displays updates to
the file as they occur. If you do not specify log-filename, the file specified by the
SET log-filename command is monitored.

MONITOR [ log-filename ]

log-filename
specifies a valid file name. The file type of the log-filename can be entry,
relative, or unstructured.

Considerations

 This command uses both sequential block buffering and control 27 to minimize the
number of messages required to monitor a log file. Control 27 is an operation that
a program can perform against a disk file. The operation notifies the program when
any entity performs a write operation to the disk file. Rather than polling the disk
file to see if it changed, SeeView uses the control 27 operation for greater
efficiency.

 The monitor command detects when a log file has been renamed and
automatically switches to a new log file if one exists.

 For additional information, see the SET command.


 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

HPE NonStop SeeView Manual Page 84 of 365


distribution
specifies either the process name of a running SeeView program or a SeeView
object file name on disk. If you specify an object file name, all running SeeView
programs with that object filename receive message-text.

message-text
displays text immediately on line 25 of the terminals associated with the specified
SeeView processes.

Considerations
For a SeeView process to accept a MSG or SEND command, that SeeView process
must have a task named MYMAIL as one of its tasks. 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 allow the MSG and SEND
statements:
TASK MYMAIL := $my;

Note. The standard SeeShell automatically declares a task MYMAIL as a socket for
MSG and SEND commands.

Example
This example demonstrates the MSG command:

MSG $MM How about lunch?

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:

HPE NonStop SeeView Manual Page 85 of 365


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.

Example
This example demonstrates the PURGE command:

PURGE myfile!{ Purges file MYFILE

RUN
The RUN command executes the specified program.

R[UN] object-filename [ startup-msg ]

object-filename
specifies a valid object file name.

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.

HPE NonStop SeeView Manual Page 86 of 365


Example
This example demonstrates the RUN command:

volume $data.myvol
r fup { runs $system.system.fup
run fup { runs $data.myvol.fup

SEND
The SEND statement sends the specified command to the SeeView processes
indicated by SeeView-process.

SEND SeeView-process
[ AUDIT ON|OFF ]
[ AUDIT RELEASE ]
[ AUDIT FILENAME disk-filename ]

SeeView-process
specifies the process name of a running SeeView program (such as $VIEW) or the
name of a SeeView object file on disk (such as $SYSTEM.SYSTEM.SEEVIEW).
When you specify a SeeView object file name, all running SeeView programs with
that object file name receive the command. This provides an easy way to
synchronize auditing between multiple SeeView processes.

AUDIT ON|OFF
specifies whether a command history trace is enabled (ON) or disabled (OFF).

AUDIT RELEASE
releases (closes) the history trace file. To create a new trace file, you must
externally rename the trace file and release it.

AUDIT FILENAME disk-filename


releases (closes) the history trace file if it is opened and redefines the name of the
trace file.

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

HPE NonStop SeeView Manual Page 87 of 365


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. The standard SeeShell automatically declares a task MYMAIL as a socket for
MSG and SEND commands.

Example
This example demonstrates the SEND command:

SEND $MM AUDIT RELEASE


SEND \NEWYORK.SEEVIEW AUDIT FILENAME \NEWYORK.$AUDIT.SEEVIEW.LOG
SEND \NEWYORK.SEEVIEW AUDIT ON

SET
The SET command displays and alters the log file name, the maximum records to be
displayed, or the maximum time the program is to wait for a control 27 to complete
before checking if file EOF changed.

SET { LOGFILE filename }


{ MAXRECS records }
{ MAXWAIT seconds }

LOGFILE filename
specifies the log file to be monitored with the MONITOR command.

MAXRECS records
specifies the approximate number of most recent records to display when the log
file is first monitored.

MAXWAIT seconds
specifies the maximum time that the program is to wait for a control 27 to complete
before checking if file EOF changed.

Examples
These examples demonstrate the SET command:

SET LOGFILE $SYSTEM.SYSTEM.OPRLOG


SET LOGFILE PATHLOG
SET MAXRECS 30

HPE NonStop SeeView Manual Page 88 of 365


SET MAXWAIT 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. Specifying a subvolume causes the display to
begin with subvolume rather than the first subvolume on the specified volume.

*
specifies all subvolumes.

Example
This example demonstrates the SUBVOLS command:

SUBVOLS $SYSTEM { Display subvols on volume $system

SYSTEM
The SYSTEM command sets and displays the current default system, if any.
SYSTEM without \system name sets the system back to the original system.

SYSTEM [ \system-name ]

system-name
specifies a valid system name.

HPE NonStop SeeView Manual Page 89 of 365


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 [ [ $volume. ] [ subvolume ] ]

volume
specifies a valid volume.

subvolume
specifies a valid subvolume.

Examples
These following examples demonstrate the VOLUME command:

VOLUME $DATA.MYSUBVOL

HPE NonStop SeeView Manual Page 90 of 365


VOLUME TEST

HPE NonStop SeeView Manual Page 91 of 365


Section 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.

Statements
Section 9: SeeView Statements and Script Symbols presents all the SeeView
statements alphabetically and describes them in detail. You can use SeeView
statements in the following basic ways:

 Statement Termination: To terminate statements, use semicolons.

 Conditional Execution: To execute statements conditionally, use the IF, WHILE,
or DO...UNTIL statements.

 Compound Statements: To group statements together into a compound


statement, delimit statements with balanced BEGIN...END pairs. For example:
IF condition THEN
BEGIN
statement;
statement;
...
END;

 Comments: To add comments to the current line, type a left brace character and
then type your comments to the end of the line:
{ this is a comment

 Iteration:
To execute statements repetitively, use the FOR, WHILE, or
DO...UNTIL statements. For example:
FOR 5 DO { The following statement is executed 5 times.
BEGIN
statement;
statement;
END;

HPE NonStop SeeView Manual Page 92 of 365


 Sources: To input statements to the SeeView interpreter from different sources,
use window sills, menu productions, EDIT files, message caches, and virtual
windows on the Help page. (Section 7: SeeView Interpreter Interface tells you
how to use these input sources.)

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.
You can organize SeeView statements into small groups, such as those interactively
entered from a window sill, or into very large groups, such as thousands of statements
in an EDIT file defining hundreds of procedures. The terms script and shell, rather than
program, are often used for these two extremes when referring to what are essentially
SeeView programs of different sizes.
For a script or shell to do anything other than declare procedures or menu data, it must
have at least one section containing SeeView statements. A SECTION is a group of
SeeView statements to be executed. (For information on the SECTION directive, see
Section 8: SeeView Directives.)
Example 5-1 shows a simple SeeView program. In the examples in this section,
capitalized words represent keywords known to the SeeView program.

Example 5-1. A Simple SeeView Program

?SECTION main {All programs have a section


{------------} {Left braces indicate end of line
comments
TASK pup; {Declare $SYSTEM.SYSTEM.PUP as a
TASK
PAGE 2; {On terminal page number 2
WINDOW pup, "listdev disc"; {Display window on PUP LISTDEV DISC
output

A keyword prefixed by a question mark in the first character position of a line is called
an interpreter directive. An interpreter directive provides structural information to the
SeeView program about the text following the directive. ?SECTION, ?PROCEDURE
and ?MENU are interpreter directives. (See Section 8: SeeView Directives.)

HPE NonStop SeeView Manual Page 93 of 365


When a SeeView script contains no interpreter, the contents of the script are assumed
to constitute a section. This example is equivalent to the program in Example 5-1:
TASK pup;
PAGE 2;
WINDOW pup,"listdev disc";

Sections
Sections declare logical groups of SeeView statements that are executed immediately
when a SeeView source file is invoked.
? SECTION section-name indicates the beginning of a section in a SeeView source
file. Most SeeView programs have only one section.
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.
This provides a mechanism for calling external SeeView programs and menus (for
example, INVOKE filename) or for reinitializing the current environment (for
example, SF15).
When a SeeView script is invoked, line 25 displays status messages that indicate what
section is being executed. If an error occurs, a message displays the source file and
section where the error occurred. When the SeeView program finishes processing a
section successfully, it indicates the source file and section name that generated the
display.
Sometimes a program generates one terminal page per section. This section-per-
display-page orientation forms a logical way to group statements.

Procedures
Procedures declare logical groups of SeeView statements that are executed with a
CALL statement. Procedures are callable anywhere a SeeView statement is permitted.
You can associate statements and procedures with a menu.
?PROC proc-name indicates the beginning of a procedure.
The PARM statement declares procedure parameters. Parameters can be passed
either by value or reference. They can be integer or string expressions.
Parameters are optional. You can specify a default parameter value to be used if the
caller does not supply the parameter value when calling the procedure. Example 5-2
shows a simple SeeView program with a procedure.

HPE NonStop SeeView Manual Page 94 of 365


Example 5-2. Simple SeeView Program With a Procedure

?PROC Listdev { #DeviceType }


{---------------------------}
PARM #DeviceType := "disc"; { # indicates DeviceType is type string
TASK pup;
WINDOW pup,"listdev " & #DeviceType;

?SECT main
{---------}
PAGE 2; CALL Listdev; { On page 2 display PUP LISTDEV DISC
PAGE 3; CALL Listdev ("tape"); { On page 3 display PUP LISTDEV TAPE

Use the VARIABLE (or VAR) statement to declare integer and string variables within a
procedure. These variables are local in scope. You can use the PRINT* statement to
display local procedure variables and their values after a procedure is executed, which
helps in debugging.
In addition to the parameters passed to a procedure, built-in string intrinsics provide
global information regarding the current SeeView environment. For more information
on string intrinsics, see

HPE NonStop SeeView Manual Page 95 of 365


String Operators and String Intrinsics on page 301301.
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.
The WITH taskid statement and various built-in string intrinsics provide task attribute
information, including task status, run-time errors, prompting state, object file name,
cache pages, cache lines, and window location and size. For a discussion of the WITH
statement and pound sign or octomorph (#), see Section 9: SeeView Statements and
Script Symbols.

Menus
The ?MENU directive declares the name of a text cache and the contents of that
cache. Each line of text following the ?MENU directive is stored in the text cache
associated with that name.
You can use the SORTED option to sort the cache records in ascending order. The
syntax for the SORTED option follows. It is described in detail under
TASK on page 255255.
SORTED [ "["start [:end ] "]" ]
The WINDOW statement displays the text stored in a cache. A window that references
a text cache can be a simple window that displays the text in the cache or a window
declared as a menu. When you declare a window as a menu, you can associate
SeeView statements and procedures with each line of text. When you point the cursor
to a line of text in a menu and press Return, the statements and procedures
associated with that line are executed.

Menu Productions
Menu productions represent menu items that you can invoke. Menu productions are
lines of text in a ?MENU cache that contain the left arrow symbol (<==). A menu
production can include one or more statements. To execute the statements associated
with the production, point the cursor to that line in a menu and press Return. When a
production includes a CALL statement, the statements in the called procedure are
executed.
For example, the following line in Example 5-3 is a menu production:
Disk <== CALL Listdev ("disc")
To invoke a production, point the cursor to that line in a menu and press Return. The
text to the left of the production symbol is the text that appears in the menu. To the

HPE NonStop SeeView Manual Page 96 of 365


right of the production symbol are one or more statements that the SeeView interpreter
executes when you invoke the menu line with the Return key.
The menu production mechanism forms the basis for a variety of techniques to create
menus that are described in this section. When you invoke a menu production by using
the Return key, the following information about the action is globally available:

 Location of the invoked menu: #MENULINE, #MENUCOL


 Size of the invoked menu: #MENUWIDTH, #MENUHEIGHT
 Location of the cursor: #FKEYLINE, #FKEYCOL
 Text to the left of the production: #MENUTEXT
 Text token pointed to by the cursor: #MENUTOKEN
 Text input to a prompt production: #MENUINPUT
 Ordinal record position of text in cache:
 # MENUCACHELINE
 #MENUCACHELINEPTR
Example 5-3 shows a simple SeeView program that displays a list of device types in a
menu. The directives in this program function as follows:

 ?MENU DevTypes declares a cache to store the names of device types and their
associated SeeView language productions.

 ?PROC Listdev displays a list of selected device types in a window beside the
caller‟s menu by using the PUP LISTDEV command.

 ?SECT Main displays the initial device type menu. Sections are executed
immediately when a SeeView program is invoked.

Example 5-3. SeeView Program With ?MENU, ?PROC, and ?SECTION Directives

?MENU DevTypes { Declare cache "DevTypes"


{-------------}
Disk <== CALL Listdev ("disk" ) { CALL ?PROC Listdev
Tape <== CALL Listdev ("tape" ) { #DeviceType = "tape"
Term <== CALL Listdev (#menutext) { #DeviceType = "Term"
Printer <== CALL Listdev (#menutext) { #DeviceType = "Printer"
Expand <== CALL Listdev ("type 63") { #DeviceType = "type 63"

HPE NonStop SeeView Manual Page 97 of 365


*

?PROC Listdev ( #DeviceType ) { Declare procedure "Listdev"


{---------------------------}
PARM #DeviceType; { #DeviceType is callers parameter.
TASK pup; { Declare PUP process taskid.
BESIDE; { Position beside invoked menu.
WINDOW pup, "listdev " & #DeviceType; { Window on Pup output from
Listdev.

?SECT Main { Declare main sect to do setup


{---------}
PAGE 2; { On terminal page number 2.
WINDOW DevTypes MENU { Build menu window on DevTypes
CACHE /disk/ UNTIL /*/ { cache from /disk/ until /*/
SIZE 13 HEADING ""; { with menu width of 13 characters.

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

vst501

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. The default production lets you associate common
procedural rules with a list of objects. (See Example 5-4.)

Example 5-4. Example of a Default and Shift Production


?MENU DevTypes { Declare cache "DevTypes"
{-------------}
Disk { The main section associates
Tape { the default production

HPE NonStop SeeView Manual Page 98 of 365


Term { CALL Listdev (#menutext)
Printer { with the DevTypes window.
Expand <== CALL Listdev ("TYPE 63") { This production overrides default.
*

?PROC Listdev ( #DeviceType ) { Declare procedure "Listdev"


{---------------------------}
PARM #DeviceType; { #DeviceType is caller’s parameter
TASK pup; { Assert PUP task/process.
BESIDE; { Position beside invoked menu.
WINDOW pup, "listdev " & #DeviceType { Window on Pup output from Listdev
NOCURSOR { Don't move cursor to pup window.
NOFRAME { Don't re-draw window if exists.
CACHE LASTLINE; { Don't wait for pup response.

?PROC HelpDev ( #DeviceName ) { Declare procedure "HelpDev"


{---------------------------}
Parm #DeviceName; { DeviceName is caller’s parameter
MSG "Shift-Return displays help, Return displays " & #DeviceName;

?SECT Main { Declare main sect to do setup


{---------}
PAGE 2; { On terminal page number 2.
WINDOW DevTypes { Declare a menu window with a
MENU "CALL Listdev(#MENUTEXT)"{ default production
,"CALL HelpDev(#MENUTEXT)"{ shift production
CACHE /disk/ UNTIL /*/ { where #menutext is the text
SIZE 13; { in the selected menu.

Example 5-4 is an example of a SeeView program that associates a default production


with a list of device types, or objects, in a menu. In this program, the directives have
these functions:

 ?MENU DevTypes declares the names of device types. Only the Expand object
requires an explicit production because the object name Expand is unknown to
PUP. The other object names, Disk, Tape, Term, and Printer, are known to PUP.

 ?PROC Listdev displays a list of devices of the selected device type in a window
beside the caller‟s menu by using the PUP LISTDEV command.

 ?PROC HelpDev displays a simple advisory help message indicating what will
happen when you press Return or Shift-Return.

 ?SECT Main displays the initial device type menu and associates the default
production “CALL Listdev(#MENUTEXT)” with the menu.
You execute a default production when you point the cursor to a menu item that does
not contain a production symbol and press Return.

HPE NonStop SeeView Manual Page 99 of 365


Shift Productions
When you select a menu item and press Shift-Return, a shift production is executed.
The WINDOW statement in the Main section of Example 5-4 declares both a default
production and a shift production. To invoke the shift production, select one of the
menu items (Disk, Tape, Term, Printer, or Expand) and press Shift-Return. In this
example, when you select Disk and press Shift-Return, ?PROC HelpDev displays the
following message:
Shift-Return displays help, Return displays disk
Default productions and shift productions provide a powerful way of associating
procedural rules with entire sets of menu items and the objects that they represent.

Pull-Down Menus
Menus can display other menus and windows through the use of the WINDOW
statement. See Example 5-5.

HPE NonStop SeeView Manual Page 100 of 365


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.
PARM #production; { Default production, if any
{ "" implies no default production.
BELOW; { Position BELOW caller's menu.
WINDOW [] MENU #production { [] references caller's menu.
HEAD ""
CACHE #target UNTIL /*/;
{ Window on that menu for #target.

?PROC Listdev ( #DeviceType ) { Declare procedure "Listdev"


{---------------------------}
PARM #DeviceType; { #DeviceType is callers parameter
TASK pup; { Assert PUP task/process.
BESIDE; { Position beside invoked menu.
WINDOW pup, "listdev " & #DeviceType { Window on Pup output from
Listdev
NOCURSOR { Do nt move cursor to pup window.
NOFRAME; { Do not re-draw window if exists.
?SECT Main { Declare main sect to do setup
{---------}
PAGE 2; { On terminal page 2.
WINDOW MyMenus MENU HEAD "System" { Declare first pull-down menu
CACHE /devices/ FOR 1 SIZE 13;

RIGHT:13; { Move to right for next menu

WINDOW MyMenus MENU HEAD "System" { Declare second pull-down menu


CACHE /utility/ FOR 1 SIZE 13;

HPE NonStop SeeView Manual Page 101 of 365


In the program in Example 5-5, the directives have these functions:

 ?MENU MyMenus declares the name of a text cache used for different menus.
You need not declare separate menu caches for each menu to be displayed. The
CACHE target option of the WINDOW statement enables you to navigate
through a cache searching for a target text object.

 ?PROC PullDown displays a list of menu options below the caller‟s menu by using
the WINDOW [ ] MENU CACHE #target statement.

 ?PROC Listdev displays a list of selected devices in a window adjacent to the
caller's menu by using the PUP LISTDEV command.

 ?SECT Main displays the initial Devices and Utility menus.
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 Example 5-13.)
Example 5-5 provides an example of a SeeView program that uses menus to provide
device type options and system utility functions. When you select a menu item
referencing the PullDown procedure, a menu is pulled down below the calling menu.
See Figure 5-2.

Figure 5-2. SeeView Output From the Program in Example 5-5

vst502

HPE NonStop SeeView Manual Page 102 of 365


Prompt Productions
When a left arrow symbol is followed by a question mark (<==?), the production is
called a prompt production. A prompt production associates user input text with a
menu item when the item is invoked. See Example 5-6 and Figure 5-3.
Menus can be declared empty and dynamically generated with the output from other
programs or through programmatically generated strings internal to the SeeView
program.
Example 5-6 uses pop-up prompts to prompt for Backup or Restore options. When you
select a Backup or Restore menu item option, a pop-up prompt appears below the
calling menu. When you respond to the prompt, the appropriate procedure (?PROC
Backup or ?PROC Restore) executes.

Example 5-6. Example of Prompts With Prompt Productions

?MENU MyMenus { Declare menu cache "MyMenus"


{------------}
Backup <== CALL PopUpPrompt( "BackupOptions" );
Restore <== CALL PopUpPrompt( "RestoreOptions");
*
[#BackupOptions ] <==? CALL Backup (#MENUINPUT)
[#RestoreOptions ] <==? CALL Restore(#MENUINPUT)

?PROC PopUpPrompt ( #target ) { This procedure displays a pop-up prompt


{---------------------------} { from the MyMenus menu cache.
PARM #target; { #target is text target in cache.
BELOW; CLEARW; { Position and clear below calling menu.
WINDOW MyMenus MENU { When Window is built the prompt production
HEAD "" { automatically reformats [#BackupOptions ]
CACHE #target { to input field with #BackupOptions value.
FOR 1 SIZE 50 GLASS;

?PROC Backup ( #options ) { This procedure does a Backup


{-----------------------} { The #menuinput is text input to the
PARM #options; { prompt production when Return is pressed.
TASK backup STARTUP #options; { Run BACKUP program with STARTUP options.
BELOW; { Position Backup window below prompt.
WINDOW backup EOFSEEK; { Window on Backup with end of file seeking.
#BackupOptions := #options; { Save input in variable for next time.

?PROC Restore ( #options )


{------------------------}
{ .. see backup

?SECT Main
{---------}
VAR #BackupOptions := "$TAPE, " & #VOLSUB & ".*, LISTALL"
,#RestoreOptions := "$TAPE, " & #VOLSUB & ".*, LISTALL"
;
PAGE 2;
WINDOW MyMenus MENU CACHE FIRST UNTIL /*/ SIZE 13 HEAD "";

HPE NonStop SeeView Manual Page 103 of 365


In the program in Example 5-6, the directives function as follows:

 ?MENU MyMenus declares the name of a cache of text used for the menus. Lines
containing prompt productions (<==?) are formatted automatically for input
between the left and right brackets. If you put a variable name within these
brackets, its value appears in the input field.

 ?PROC PopUpPrompt displays the appropriate prompt. For example, when you
select the menu option Backup, the contents of variable #BackupOptions appears
in a highlighted input field below the calling menu. (See Figure 5-3Error!
Bookmark not defined..) You can edit this input field directly. When you press the
Return key from this field, the procedure ?PROC Backup is called.

 ?PROC Backup runs the BACKUP program using the options input to the prompt
production. The results appear in a window below the prompt. This procedure sets
the value of the global variable #BackupOptions so that the most recent prompt
input text for Backup is retained.

 ?SECT Main displays the initial Backup/Restore menu.


Figure 5-3. SeeView Output From the Program in Example 5-6

vst5-3

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. DECLARE (DEC) and
VARIABLE (VAR) are synonyms that you can use interchangeably.

HPE NonStop SeeView Manual Page 104 of 365


Integer and string variable scope is global when declared in a section and local when
declared in a procedure.
Global variables remain in effect until another ?SECTION containing a DECLARE
statement is encountered, or indefinitely if ALTER RETAIN is ON. The standard
SeeShell sets the ALTER RETAIN option ON.
The
TASK statement declares task variables, and they remain in effect while the SeeView
program is executing. The scope of task variables is global regardless of where they
are declared.

Integer Variables
Integer variables represent 16-bit signed integers. For example:

TASK psmail;
VAR x := 70*3 { 210
,y := x/4 { 52
,z := y * "2" { 104
,t := psmail { 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 #. (See the description for the # sign on page 295.)

WITH PSMAIL;
VAR x := 70*3,
y := x/4,
#s := "Time " & #TIME & " Date " & #DATE[1:8] & " X*Y=" & x*y,
#t := #DROP #s { "Time " gets dropped from string #s,
#z := " With task is " & #TASKSYMBOL & " on page " & #TASKPAGENO;

You can use string variables anywhere a string expression is permitted. To display the
contents of a string variable or string expression, use the PRINT statement.

Task Variables
The
TASK statement declares a symbolic taskid name that is associated with a program
on a NonStop system. Various SeeView statements can communicate with the task.
Task variables remain in effect while the SeeView program is executing.

HPE NonStop SeeView Manual Page 105 of 365


A task variable has a type of integer except that it cannot appear on the left side of an
assignment statement. In all other respects, you can use task variables in the same
way as integer variables.
Task variables refer to various attributes of a task: they associate these attributes with
windows, and they perform read and write operations. The statements that operate on
a taskid are
WRITE, READ, WITH, OPEN, BREAK, GRAPH, PUSH, POP, SAVE, LOAD,
DELETE and STOP.
Reexecuting a
TASK statement reasserts the declaration. If the program has stopped, it is restarted.
To access task attributes programmatically, use the WITH statement in conjunction
with the #TASK...intrinsics. For a complete list of #TASK... intrinsics, see the
description for the pound sign or octomorph (#) in Section 9: SeeView Statements
and Script Symbols.
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. Example of TASK Variable Usage

?PROC DoTacl ( #command )


{-----------------------}
PARM #command;
VAR width := 80; { default size of tacl window.
VAR height := 24;
TASK tacl; { If tacl was declared then reasserts it.
{ If here, tacl running; See if window exists
WITH tacl; { #TASKPAGENO intrinsic uses WITH taskid.
IF #TASKPAGENO THEN BEGIN { <> 0 implies page number with tacl window.
PAGE #TASKPAGENO; { Go to page with an existing tacl window.
LINE #TASKLINE, #TASKCOL;{ Use its current location.
LET width := #TASKWIDTH;{ And current size
LET height := #TASKHEIGHT;
END ELSE { No tacl window exists display one
BELOW; { below callers menu

WINDOW tacl,#command CACHE LASTLINE SIZE width,height NOFRAME.

Certain TASK statement options (for example, CACHEPAGES) are meaningful only
the first time the TASK statement is successfully executed. The CACHEPAGES option
determines the size of the message cache memory associated with the user task.

HPE NonStop SeeView Manual Page 106 of 365


Specifying an object name that is a process name rather than an object file
declares a task variable without starting a process. Use this specification both for
declaring external process window sockets and for dynamically constructing the text
that is contained in a window, such as a menu.
Other TASK statement options are meaningful only when the process is started. These
include the CPU, PRIORITY, VOLUME, and startup-message options.
Some TASK statement options, such as [:=object], COPY, TIMEOUT, and QUEUE,
have meaning every time the statement is executed.
The [:= object] option reassigns the program object name, which is either a process
ID (pid) or an object file, to the taskid. Reassignment of a taskid with a different object
name is permitted if the previously declared object is stopped. Thus, this command is
permitted:
TASK ci := tacl; STOP ci; TASK ci := comint;
For additional information on TASK statement options, see Section 9: SeeView
Statements and Script Symbols.

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. Designational integer assignment
expressions that use the assignment operator (:=) are permitted anywhere an
expression is permitted.

HPE NonStop SeeView Manual Page 107 of 365


The expression ( x := #s > 10 ) results in:

 x = true (minus-one value) if #s starts with an ASCII string of numeric characters
greater than 10.

 x = false (zero value) if #s starts with an ASCII string of numeric characters less
than or equal to 10.

 Run-time error "Input conversion #s" if #s contains a value that is too large (greater
than 32767) or begins with nonnumeric characters.
Operations between mixed types of expressions (for example, integer and string)
convert string data to internal arithmetic values automatically. Relational comparisons
between strings such as (#a > #b) result in a relational string comparison, not a
relational arithmetic comparison.

Integer Assignment
Integer assignment statements begin with the optional keyword LET and follow first
with the integer variable, then with the := assignment operator, and finally with the
expression to be evaluated and assigned to the integer variable.
You can also specify integer assignment by using designational expressions anywhere
an expression is permitted. For more information on designational expressions, see
the description for the
Parentheses ( ) on page 293293.
These examples show integer assignment statements:

LET x := y+z; { This is an integer assignment statement.


x := y+z; { This is also an integer assignment statement.
IF x:= y+z THEN { 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. To parse tokens, use the string
operators #TAKE, #DROP, and #TRIM. You can index string variables on either side of
the statement. For more information on string assignment, see the description for the
Pound Sign # on page 295295.
These examples show string assignment statements.

#s := "Year 19" & #TAKE #DATE; { #s = "Year 1988"


#s[6] := "2001"; { #s = "Year 2001"
#s := "Five Factorial=" & 1*2*3*4*5; { #s = "Five Factorial=120"
SCAN #s until "=" ->x; { x is 15 (index of the =)

HPE NonStop SeeView Manual Page 108 of 365


SCAN BACK #s[#size #s] UNTIL "F" -> x; { x is 6 (index of F)

String Intrinsics
String intrinsics are built-in read-only variables that return string values intrinsic to the
SeeView environment. Begin string intrinsics with the string type flag (#) and follow
them with any of the string intrinsic keywords described under

HPE NonStop SeeView Manual Page 109 of 365


String Operators and String Intrinsics on page 301301 for the string assignment
statement.
String intrinsics provide information about the environment such as:

 The current date and time (#DATE, #TIME)


 The size and location of a menu just invoked (#MENUWIDTH, #MENUHEIGHT,
#MENULINE, #MENUCOL)

 The cursor location when the Return key was last pressed (#FKEYCOL,
#FKEYLINE)

 The attributes of the task defined to SeeView through the WITH statement
(#TASKSTOPPED, #TASKPROMPTING, #TASKPAGENO,
#TASKOBJECTNAME)

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.

VAR #s := "one two three";


VAR #t;

#t := #TAKE #s; { #t = "ONE"


#t := #DROP #s; { #t = "TWO three"
#t := #TRIM #s; { #t = "ONE" #s = "TWO three"

The TRIM function returns the first token in a string variable and removes that token
from the contents of the string variable. For example:

#s:="one two three"; { s = "one two three"


DO BEGIN { This loop shows three
#t:= #TRIM #s; { Line 25 messages:
MSG #t; { "ONE", "TWO", "THREE"
END UNTIL #s=""; { Note: #s is null when done

When you use lowercase, the system translates it to uppercase automatically.

HPE NonStop SeeView Manual Page 110 of 365


String Tokens
A string token is a group of characters returned by either the #TAKE or #TRIM string
operators. These rules apply to a token:

 If the first nonblank character is alphabetic, the token consists of that character
and all the following alphanumeric characters.

 If the first nonblank character is numeric, the token consists of that character and
all the following numeric characters.

 If the first nonblank character is special (neither alphabetic nor numeric), the token
is a one-character token.

Modal and Modeless Dialogue Boxes


SeeView scripts can prompt for information in either a modal or modeless manner.
The standard SeeView SeeShell environment is modeless. Modeless environments
allow disjoint functions and services to be offered together in an integrated manner,
rather than requiring you to hierarchically nest and navigate a variety of prompts,
screens, and windows. You are more productive because you can use other services
when you are prompted for information.

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.


For example, when you are prompted for a file name or subvolume with a modal
prompt, you can only respond to that prompt. You must respond to the prompt.

 Other windows, menus, and prompts do not work during the modal prompt.
 Built-in value-added functions such as paging, scrolling, and editing do not work
during the modal prompt.

HPE NonStop SeeView Manual Page 111 of 365


Modeless Environments
Modeless prompts enable you to respond to a prompt or dialog box and also to any
other menu, window, or prompt in the current environment. In other words, when a
modeless prompt appears, you are not constrained to respond only to that prompt but
can also interact with any other visible screen object.
The advantage of modeless prompts is that you are free to go from one window, menu,
or prompt to another without the need to enter, exit, or activate other windows, menus,
or prompts.
If a prompt for a subvolume is modeless, you can use other services provided by the
environment, such as:

 Mail, to recall the name of the subvolume of interest


 An editor, to edit a file in that subvolume
 FUP, to resecure the subvolume
You can then respond to the prompt.

Modal Prompts
To set up a modal prompt, use the ACCEPT statement FKEYWAIT option. Example 5-
8 Error! Bookmark not defined. shows a program that uses a modal prompt. The
directives of this script function as follows:

 ?MENU Scratch declares a scratch cache to store prompt production images.
 ?PROC Prompt uses the input parameter #prompt to build a prompt production
and store it in the scratch cache. A menu window is displayed on the formatted
prompt production. The ACCEPT statement FKEYWAIT option is then executed.
During the FKEYWAIT, you can use no other menus or windows. When you press
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.

HPE NonStop SeeView Manual Page 112 of 365


Example 5-8. Example of Modal Prompt Usage

?MENU Scratch
?PROC Prompt(#prompt,#answer)
{---------------------------- { Proc does a waited prompt.
PARM #prompt IN, { Format of <Prompt>[<response>]
#answer OUT; { Response returned in #answer.

PUSH #prompt & "<==?" { Make prompt text a production


ONTO scratch; { and store result in a cache.

WINDOW scratch MENU { Window on prompt text


GLASS HEAD "Prompt" { with no menu production,
CACHE LASTLINE FOR 1 { Text is last line of cache,
SIZE #SIZE #prompt+4; { and a width of prompt+4.
FLUSH; { Display window immediately !

ACCEPT #answer FKEYWAIT; { Do a waited (modal) accept


{ until an fkey is pressed.
CLEARW; UNLOCK; { When fkey is pressed, erase
{ prompt, unlock keyboard, and
RETURN; { return control to caller.
{ Response is in #answer.
?PROC FileInfo( #subvol )
{------------------------ { Proc does FUP INFO on #subvol
PARM #subvol;
TASK fup; { Declare fup task
WINDOW fup,"info " & #subvol & ".*" { Window on output
CACHE LASTLINE NOFRAME; { without waiting.

?SECT EnterSubvol
{---------------- { Popup up a prompt for subvol
VARIABLE #subvol; { Variable to contain subvol.
BESIDE; CW; { Position beside caller menu.

CALL Prompt ("Enter Subvol:[ ]", #subvol );


CALL FileInfo ( #subvol );

When the script in Example 5-8 is invoked:

 ?SECT EnterSubvol declares a global variable #subvol and positions the screen
buffer address beside the calling menu so that the prompt appears beside the
caller‟s menu.

 The ?PROC Prompt is called.

HPE NonStop SeeView Manual Page 113 of 365


Figure 5-4. Modal Prompt From the Program in Example 5-8

vst5-4.vsd

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

vst5-5.vsd

Modeless Prompts
A modeless prompt is established when you associate a production with a window.
Example 5-9 is an example of a program that uses a modeless prompt. The directives
of the script function as follows:

 ?MENU Scratch declares a scratch cache to store window text images.
 ?PROC Prompt uses the input parameter #prompt to build a prompt production
and store it in the scratch cache. A menu window then appears on the formatted
prompt production. The procedure uses the input parameter #action as the default
menu production for this Prompt window. This #action production tells SeeView
what to do when you point to the prompt and press Return. Once this window has
been declared, the procedure returns control to the SeeView program so that you
can use this prompt as well as any other menu, window, or prompt.

 ?PROC FileInfo uses input parameter #subvol to display FUP INFO * output for
#subvol.

 ?SECT EnterSubvol is executed when the script is invoked.

HPE NonStop SeeView Manual Page 114 of 365


Example 5-9. Example of Modeless Prompt Usage

?MENU scratch
?PROC Prompt(#prompt,#action)
{---------------------------- { Proc does a nowaited prompt.
PARM #prompt IN, { Format <Prompt>[<response>]
#action IN; { Production to execute

PUSH #prompt & "<==?" { Make prompt text a production


ONTO scratch; { and store result in a cache.

WINDOW scratch MENU #action { Window on prompt text with


GLASS HEAD "Prompt" { #action= default production.
CACHE LASTLINE FOR 1 { Text is last line of cache,
SIZE #SIZE #prompt+4; { and has a width of prompt+4

?PROC FileInfo( #subvol )


{------------------------ { Proc does FUP INFO on #subvol
PARM #subvol;
TASK fup; { Declare fup task
WINDOW fup,"info " & #subvol & ".*" { Window on output
CACHE LASTLINE NOFRAME; { without waiting.

?SECT EnterSubvol
{---------------- { Popup up a prompt for Subvol
BESIDE; CW; { Position beside caller menu.

CALL Prompt( "Enter Subvol:[ ]",


"BELOW; CALL FileInfo(#menuinput)" );

When the script in Example 5-9 is executed, this sequence occurs:


?SECT EnterSubvol positions the screen buffer address beside the calling menu so
that the prompt appears beside the caller‟s menu. The ?PROC Prompt is called with
input parameter #prompt defining the format of the Prompt window and input
parameter #action defining the production “BELOW; CALL FileInfo(#menuinput)” to
associate with the Prompt window.
When you move the cursor to the Prompt window and press Return:

 The production associated with the window is executed “BELOW; CALL
FileInfo(#menuinput)”.

 The text contained in the prompt field, “$DATA.SEEC20”, is passed to the ?PROC
FileInfo via the intrinsic #menuinput.

 The FUP information output for that subvolume appears.


You can select another subvolume at any time by moving the cursor to the Prompt
window, entering the name of another subvolume, and pressing Return. All of the
windows, menus, and prompts displayed in Figure 5-6 are active at all times. You are
free to interact with all visible objects because the environment is modeless.

HPE NonStop SeeView Manual Page 115 of 365


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

vst5-6.vsd

Field Attribute Productions


The WINDOW statement FIELDS option defines windows or dialogue boxes with
multiple input-output fields. Lines of text in cache containing left and right square
brackets delimit the location of input-output fields when a window with the FIELDS
option displays this text. A field attribute production (a double colon :: symbol)
appended to the end of a cache line defines the field attributes of the fields in that line
of cache.
Example 5-10 shows a program that defines a window with multiple input-output fields.

HPE NonStop SeeView Manual Page 116 of 365


Example 5-10. Example of Field Attribute Production Usage

?MENU Person
{-----------}
First [ ] Last [ ] :: (alpha) (alpha)
Address [ ]
City [ ] State[ ] Zip[ ] :: (a) (a) (n notab)
*

?PROC PutPerson ( #first, #last, #addr, #city, #st, #zip )


{--------------------------------------------------------}
PARM #first, #last, #addr, #city, #st, #zip;
WINDOW person { Display person cache
CACHE FIRST UNTIL "*" SIZE 43 { First line until "*",
MENU "CALL GetInput" { with GetInput production
KEYS F5,F6,F7 { keys invoking production
FIELDS (underline); { format with fields option.
DISPLAY #first,#last,#addr,#city,#st,#zip; { Display data in fields.
?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.
LINE #menuline, #menucol; { Address window
ACCEPT #first,#last,#addr,#city,#st,#zip;{ Accept fields

?MENU People { To store person data


?PROC GetInput
{------------}
VARIABLE #first, #last, #addr, #city, #st, #zip, #s;
CALL GetPerson( #first, #last, #addr, #city, #st, #zip );
#s[ 1] := #first;
#s[10] := #last; { Put person data
#s[22] := #city; { in people cache
#s[30] := #st & ", " & #zip;
PUSH #s ONTO people; { Display people window
BELOW; { below person window.
WINDOW people CACHE FIRST NOFRAME NOCURSOR NOSILL SIZE #MENUWIDTH;

?SECT Main
{---------}
CALL PutPerson("John", "Smith", { Display person
"500 Main Street", { window with
"Chicago","IL","60172"); { initial data.

When the program in Example 5-10 is invoked:

 ?MENU Person declares a cache named “Person” and stores the format of the
Person screen in that cache. Cache elements containing field attribute productions
( :: ) define the domain of acceptable input values for those fields.

HPE NonStop SeeView Manual Page 117 of 365


 ?SECT Main is executed, and ?PROC PutPerson is called with a set of initial
values.

 ?PROC PutPerson receives the initial values for a person in its input parameters.
The procedure then declares a WINDOW on the Person cache with a default
production of “CALL GetInput” and with the FIELDS (underline) format option
specified. This WINDOW statement displays the input-output dialog box shown in
Figure 5-7.

Figure 5-7. SeeView Output From the Program in Example 5-10

vst5-7.vsd

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. For a complete description of
field attributes, see the WINDOW statement in Section 9: SeeView Statements and
Script Symbols.
Once the Person window is declared, the DISPLAY statement displays the parameter
values #first, #last, ... in the person WINDOW. The action of the DISPLAY statement is
a function of the current screen buffer address. To update any input-output field
window, you only need to specify the screen buffer address of that window and
execute a DISPLAY statement. The fields in the window are updated in left-to-right,
top-to-bottom order.
?PROC GetInput is called when you press Return because “CALL GetInput” is the
default production associated with the Person window. (The KEYS option also causes
F5, F6, or F7 to call ?PROC GetInput.) When the procedure is called, it calls ?PROC
GetPerson to accept the current data values into local variables #first, #last, ... from
the fields in the Person window. These values are then added to the People cache,
and a window appears on the People cache.

HPE NonStop SeeView Manual Page 118 of 365


Updating Fields
You can update window fields four different ways:

 Specify the initial value of a field by placing the literal text that is to appear in the
field after the start field delimiter. For example, the First name field in Example 5-
11 contains the literal text “John” after the left square bracket start field delimiter.

 Update fields with a DISPLAY statement that uses string expressions. For
example, the Last name field in Example 5-11 is updated with the statement
DISPLAY “Smith”.

 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. For example, the City, State, Zip fields in Example 5-11 are
updated with the statement:
DISPLAY FIELD 3 FROM CityStateZip;

Example 5-11. Example of Various Field Update Techniques

?MENU Person
{-----------}
Last [ ] First [John ] :: (alpha) (alpha)
(1)
Address [#address ]
(3)
City [ ] State[ ] Zip[ ] :: (a) (a) (n notab)

*
?MENU CityStateZip
{-----------------}
Chicago
IL
60172

?SECT Main
{---------}
VAR #address := "500 West Main";

WINDOW person FIELDS (u) CACHE UNTIL "*" SIZE 42 ;

DISPLAY "Smith";
(2)

HPE NonStop SeeView Manual Page 119 of 365


DISPLAY FIELD 3 FROM CityStateZip;
(4)

When the script in Example 5-11 is invoked:

 ?MENU Person defines the input-output screen image for the Person screen. The
text “John” and #address are copied into the cache along with the rest of the
screen images.

 ?MENU CityStateZip stores the city, state, and zip code in a cache named
CityStateZip.

 ?SECT Main declares a variable named #address and initializes that variable to a
value of “500 West Main.” A window is displayed on the Person cache as shown in
Figure 5-8. When the window is displayed, the text “John” is displayed in the First
name field and the text “500 West Main” is displayed in the Address field.
The statement DISPLAY “Smith” updates the Last name field with the text “Smith.” A
list of string expressions is also acceptable. This example would also result in the
display shown in Figure 5-8:
DISPLAY "Smith","John","500 West Main","Chicago","IL","60172"
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

vst5-8.vsd

Function Keys
The WINDOW statement KEYS option associates function keys with windows in the
SeeView environment. See the Main section of Example 5-12.

HPE NonStop SeeView Manual Page 120 of 365


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.
DELETE PersonData!; { Clear person cache.

ACCEPT INTO PersonData FIELDPERLINE { Accept all fields to cache.


#last, #first; { Last, First fields to vars.

IF #fkey = 5 THEN BEGIN { Add Person


POP #data FROM PersonData; { INSERT INTO PERSON (*)
WRITE SQLci,"INSERT INTO PERSON(*) VALUES('" &#data& "'";
WITH PersonData; {
FOR #TaskCacheLines DO BEGIN { ,"data" . ..
POP #data FROM PersonData;
WRITE SQLci, #spaces[1:28] & ",'" & #data & "'";
END;
WRITE SQLci, ");"; { );
END;

IF #fkey = 6 THEN { Delete person


WRITE SQLci,"DELETE FROM PERSON WHERE LAST = '" & #last
& "' and FIRST= '" & #first & "';";
IF #fkey = 7 THEN { List person

WRITE SQLci, "SELECT * FROM PERSON;";


BELOW;
WINDOW SQLci CACHE -">>" NOFRAME NOCURSOR SIZE 66,12;

?SECT Main
{---------}
WINDOW person CACHE FIRST UNTIL "*" SIZE 43
MENU "CALL PersonMaint"
FIELDS (underline)
KEYS F5, F6, F7
HEAD "Add-F5 Del-F6 List-F7";

HPE NonStop SeeView Manual Page 121 of 365


When the program in Example 5-12 is invoked:

 ?SECT Main displays the Person window (or dialog box) shown in Figure 5-9.
 ?PROC PersonMaint is called when you press F5, F6, or F7. PersonMaint starts a
SQL conversational interface (SQLCI) session, clears the PersonData cache, and
then accepts the data from the Person window into the PersonData cache. If you
press F5, commands are issued to the SQLCI to insert the accepted data into the
SQL Person table as Figure 5-9 shows.

Figure 5-9. SeeView Output From the Program in Example 5-12 When F5 Is Pressed

vst5-9.vsd

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-
10Error! Bookmark not defined..

Figure 5-10. SeeView Output From the Program in Example 5-12 When F7 Is Pressed

vst5-10.vsd

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.

HPE NonStop SeeView Manual Page 122 of 365


Example 5-13 shows a program that displays the definition of the word selected by the
cursor when you press SF10.

Example 5-13. Example of a Nonmenu Window Production

?MENU Dictionary
{---------------}
Apple = A round, firm, fleshy, edible fruit with a
green, yellow, or red skin and small seeds.
*
Banana = A long, narrow, somewhat curved fruit that has a sweet,
creamy flesh covered by a yellowish, or reddish skin.
*
Orange = A reddish-yellow, round, edible citrus
fruit, with a sweet, juicy pulp.
*
?PROC Webster( #word )
{--------------------} Lookup #word in dictionary
PARM #word;
VAR WordFound;

SEARCH Dictionary CACHE #word & " =" -> WordFound;


IF WordFound<0 THEN BEGIN
MSG "No definition for this word";
RETURN;
END;
BELOW;
WINDOW Dictionary CACHE INDEX WordFound { Display definition
UNTIL "*" NOSILL; { in "dictionary".
?SECT Main
{---------}
TASK seedit CACHE 100;
WINDOW seedit PRODUCTION "CALL Webster( #MENUTOKEN )"
KEYS SF10
NOGLASS CACHE SIZE 70,12;

When the program in Example 5-13 is invoked:

 ?MENU Dictionary declares a cache named Dictionary and stores the definitions of
the words that follow the ?MENU directive.

 ?SECT Main starts a Seedit task and displays a window on the Seedit task. The
window has the production “CALL Webster(#MENUTOKEN)” associated with it.
This production is executed when you press a function key that was specified with
the WINDOW statement KEYS option.

 ?PROC Webster is called when you press SF10. The #word of text selected by the
cursor position is passed to the procedure via the #MENUTOKEN intrinsic. The
procedure then searches the Dictionary cache for the #word.

HPE NonStop SeeView Manual Page 123 of 365


If #word is not found, a message indicates “No definition for this word.”
If #word is found in the dictionary, a window appears on that definition.

Figure 5-11. SeeView Output From the Program in Example 5-13

vst5-11.vsd

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[ ] :: (u) (u) <== CURSOR #fkeyline+1;

Password[ ] :: (r blank) <== CALL logon;


*
?MENU ValidUsers
{---------------}
Operator.Bob,passwd
Operator.Mike,smile
Operator.Carole,yosemite

?PROC Logon
{----------}
{ Accept group, user, password. NOTE script is modeless
{------------------------------------------------------}
VAR #group, { will contain group name
#user, { will contain user name
#password, { will contain password
ok; { true indicates logon ok
LINE #menuline,#menucol;
ACCEPT #Group, #User, #Password;

SEARCH validUsers -> ok { Search for group.user


CACHE #group &"."& #user &","& #password;
IF ok<0 THEN BEGIN
MSG(R) "Invalid logon. Please try again.";

HPE NonStop SeeView Manual Page 124 of 365


RETURN;
END;

MSG #user &" logged on.";{ Logged on.


SECURE ENABLE *;
BELOW;
OPEN TACL; { Open tacl window.

?SECT Main
{---------}
SECURE F1 F2 SF1 SF2;
PAGE 1; CLEARW;
WINDOW LogonScreen MENU FIELDS
CACHE FIRST UNTIL "*" SIZE 40
HEAD "Please Logon";

When the program in Example 5-14 is invoked:

 ?MENU LogonScreen declares the definition of the logon screen. The logon
screen uses field attribute productions to declare the field attributes of each of the
fields that will appear in the logon screen.
You can use a field attribute production (::) and a script production (<==) on the
same cache line. For example, in the line defining the Group and User fields, the
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. The Main
section secures function keys F1, F2, SF1, and SF2 to prevent users from going to
other pages of the environment before logging on.

 ?PROC Logon is called when you press Return with the cursor in the Password
field. The procedure accepts the Group, User, and Password field data and then
searches the ValidUsers cache for a match. If none is found, you are denied
access. If the group, user, and password are found in the valid users cache, you
are allowed access (logged on), and the output in Figure 5-12 appears.

HPE NonStop SeeView Manual Page 125 of 365


Figure 5-12. SeeView Output From the Program in Example 5-14

vst5-12.vsd

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. Example Program Showing Direct Field Update Techniques

?MENU Person { Define Person dialogue box and associated field values
{-----------
First [ ] Last [ ]
Address[ ]
City [ ] State[ ] Zip[ ]
Phone [ ]
*
<First> { Values for First name field above.
Robert
John
Jessica
*
<Last> { Values for Last name field above.
Johnson
Smith
Thompson
*
<Address> { Values for Address Field above.
18922 Forge Drive
19333 Vallco Parkway
*
<City> { Values for City Field above.
Chicago
SanFrancisco
*
<State> { Values for State Field above.
IL
CA
*

HPE NonStop SeeView Manual Page 126 of 365


<Zip> { Values for Zip Field above.
60195
95014
*
<Phone> { Values for Phone Field above.
708-285-5555
408-285-6000
*
?SECT Main { Display Person Dialogue Box
{---------
PAGE #lastpage; CLEARW;
WINDOW Person MENU "CALL OfferList"
FIELDS (underline)
CACHE FIRST UNTIL "*" SIZE 50;

?PROC OfferList

{--------------
{ Display a menu of legal values for the selected field.
{ Using the field <label> to the left of cursor, search cache
{ for this <label> and display menu of values for the field.
{ For example: If Return is pressed in First name field the
{ intrinsic #menutext = First [ ] Last [ ].
{ We search cache to find the <First> values for this field.
{ If "<First>" is found in cache, the <First> values are displayed
{ in a menu, and the original panel is protected (using DISPLAY
{ VIDEOTEMP option). Note that this presents the user with what
{ appears to be a Modal screen, because they can't access the
{ parent dialogue box. However, the script is in fact modeless
{ because it doesn't require an ACCEPT FKEYWAIT.
{
{ Some human factors people believe that these modal screens
{ are easier for less experienced users to use. More experienced
{ users may find such modes confusing and overly restrictive
{---------------------------------------------------------------
VAR cursorIndex { Index of cursor in menu
,#fieldName { <name> of field pointed to by cursor
, fieldline:=#fkeyline{ Screen Line location of selected fld
, fieldcol { Screen Col location of selected fld
, nextline:=#fkeyline { Screen Line of next field
, nextcol { Screen Column of next field
,#s:=#menutext { scratch
, i
;
CursorIndex := #fkeycol-#menucol; { Position in menu
scan #s[ CursorIndex ] until "[" -> nextcol; { Find next fld on
if not nextcol then begin { screen. This is
nextline:=nextline+1; { the field after
nextcol:=#menucol; { the cursor
end;

scan back #s[ CursorIndex ] until "["-> i; { Find starting


if not i then return; { location of field
fieldcol := #menucol+i+1; { containing cursor

scan back #s[i-1] while " " ->i; { find end of label

HPE NonStop SeeView Manual Page 127 of 365


if not i then return;
scan back #s[i] until " " ->i; { find label start
if not i then return;

#fieldname:="<" & #TAKE #s[i:132] & ">"; { build <label> and


search #menutaskid cache #fieldname -> i; { search for <label>
if not i then return; { If not found rtn

below; { Show options menu


window #menutaskid
menu "call InsertText(" &#menuline& "," &#menucol& ","
&(fieldline)& "," &(fieldcol)& ","
&(nextline)& "," &(nextcol)& ")"
cache index i+1 until "*" size 20
Head #fieldname & " Esc-F16" keys F16;
msg(r) "Select " & #fieldname;

line #menuline,#menucol; { Protect all fields


DISPLAY VIDEOTEMP( PROTECT ); { in parent window.
?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.
FieldLine, FieldCol, { Location of insertion field
NextLine, NextCol; { Location of the next field
VAR #s,i,j; { scratch variables

if #fkey<>16 then begin { If not escape selection menu


#s:= #menutext; { Get text to insert into field
scan #s while " " ->i; { Strip off leading blanks
scan back #s while " " -> j;{ Strip off trailing blanks
LINE FieldLine, FieldCol; { Insert selected text in field
ERASELINE; { First clear old text in field
[ #s[i:j] ]; { Output selected text to field
end;

CLEARW #menuline,#menucol,1; { Delete option menu on screen

LINE ParentLine, ParentCol; { Restore window field defaults


DISPLAY VIDEOTEMP(); { <------<New Feature>---------

if #fkey=16 then { If escape


CURSOR FieldLine, FieldCol { put cursor back in same field
else { Else was value inserted,
CURSOR NextLine, NextCol; { move cursor to next field.
{ end of script 1/5/93/mm

When the program in Example 5-15 is invoked:

 ?MENU declares the definition of the Person dialog box. The Person cache
contains both the screen definition and the values for each field in the screen.

HPE NonStop SeeView Manual Page 128 of 365


 ?SECT Main displays the Person dialog box as shown in Example 5-13, and
associates the production CALL OfferList with the Person dialog box.

Figure 5-13. SeeView Output From Program in Example 5-15

vst5-13.vsd

When Return is pressed with the cursor in the First name field, as shown in Figure 5-
13, ?PROC Offerlist is called. The procedure uses the text to the left of the cursor to
build a label that represents the name of the field. This label is stored in the local
variable #fieldName. The label is then used to search the cache associated with the
Person dialog box. If the label is found, a menu of the values associated with the label
appears, as shown in Figure 5-14Error! Bookmark not defined..

Figure 5-14. Output When Return Is Pressed in the First Name Field

vst5-14.vsd

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.
When either Return or F16 is pressed in the menu of FIRST names, shown in Figure
5-14:

 ?PROC InsertText is called. If Return was pressed, the procedure inserts the
selected FIRST name (contained in #menutext) into the First name field located at
FieldLine and FieldCol. If F16 was pressed, no value is inserted.

 The FIRST name menu is then erased from the screen by using a CLEARW
statement, the parent Person menu is made accessible once again by using the
DISPLAY VIDEOTEMP ( ) option, and the cursor is positioned appropriately, as
shown in Figure 5-15.

HPE NonStop SeeView Manual Page 129 of 365


Figure 5-15. Output When Return Is Pressed in the FIRST Name Menu

vst5-15.vsd

Repeatedly pressing Return with the cursor in the Person dialog box causes the
Person fields to be updated, as shown in Figure 5-16Error! Bookmark not defined..

Figure 5-16. Output When Return Is Repeatedly Pressed

vst5-16.vsd

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. You can add external scripts to
the standard SeeShell External menu by using the External menu item under the
SeeView Extras menu. When you add a file to the External menu, you invoke it by
selecting that menu item, as Figure 5-17Error! Bookmark not defined. shows.

Example 5-16. Example of an External Script to Configure an Environment

?MENU Config
{-----------}
PROGRAM Filename[ ] :: (alphanum)
Command [ ]

WINDOW Page [ ] Location [ ] :: (n)


Width [ ] Height[ ] :: (n) (n)
Heading [ ]
*
?PROC GetConfig
{--------------}
LINE #menuline, #menucol;
VARIABLE #ci, #cmd, #pg, #loc, #width, #height, #hdr;
ACCEPT #ci, #cmd, #pg, #loc, #width, #height, #hdr;

EXECUTE "TASK " & #ci; { declare command interpreter


EXECUTE "WITH " & #ci; { get with command interpreter

HPE NonStop SeeView Manual Page 130 of 365


IF #cmd<>"" THEN WRITE #taskid,#cmd;
IF #pg <>"" THEN PAGE #pg;
IF #loc<>"" THEN EXECUTE #loc;
IF #width="" THEN #width:=80;
IF #height=""THEN #height:=24;
IF #hdr="" THEN #hdr := #tasksymbol;

WINDOW #taskid CACHE LASTLINE


SIZE #width,#height NOCURSOR
HEAD #hdr;
?SECT Main
{---------}
BESIDE;
WINDOW Config MENU "CALL GetConfig" FIELDS (u)
CACHE FIRST UNTIL "*" SIZE 52;

When the program in Example 5-16 is invoked from the External menu:

 ?MENU Config stores the screen image data in a cache named Config.
 ?SECT Main positions the current screen buffer address beside the calling menu
(which is the External menu) and displays the Config window dialog box.

 ?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-
17Error! Bookmark not defined..

Figure 5-17. SeeView Output From the Program in Example 5-16

vst5-17.vsd

HPE NonStop SeeView Manual Page 131 of 365


ServerMode
To run the SeeView program as a server, start the program with a startup PARAM
SERVERMODE mode value, where mode is nonzero. SeeView then does not open its
output file as a block-mode terminal.
Operating the SeeView program as a pure server under the control of a script has
several useful applications. One application, shown in Example 5-17, provides a
command interpreter gateway for requestors such as Pathway, or a cooperative
workstation graphical user interface (GUI).
Used in this manner, ServerMode provides a client-server bridge to the interactive-text-
interface command world and greatly improves client-server performance by providing
up to a 100:1 blocking factor for ITI-mode command responses.
ServerMode scripts can also perform audit and control of the commands and
subsystems accessed by the host or workstation clients.

Example 5-17. Example of a SeeView ServerMode Script

?PROC HandleRequest ( #request, ReqTaskid )


{-----------------------------------------}
{ Use <ci> and <cmd> contained in #request to perform operation.
{ Return result to ReqTaskid in a single large blocked reply msg.
{---------------------------------------------------------------}
PARM #Request, { Request = <ciname> <command>
ReqTaskid; { <taskid> sending request
VAR #ciname:= #TAKE #request,{ <ciname>
#cmd := #DROP #request,{ <command>
citaskid; { <ci taskid number>
EXECUTE "TASK " & #ciname; { Start ci.
EXECUTE "WITH " & #ciname; { Get with ci.
citaskid := #TASKID; { Get ci taskid.
DELETE citaskid!; { Clear ci cache.

WRITE citaskid, #cmd; { Send command to ci.


WHILE NOT #TASKPROMPTING DO { Wait for ci prompt.
READ citaskid;

WRITE ReqTaskid,#cmd { Reply to Requestor with


FROM citaskid;{ cmd and entire ci response

?SECTION ReadReceive
{-------------------}
VAR secs:=300, { $Receive timeout in seconds
#request, { Request from $receive
error; { Error= 0 write, 1 writeread, 40 timeout
{ Declare requestor $receive socket
TASK requestor:= $xxxx TIMEOUT secs,secs;
DO BEGIN
READ requestor PEEROK, #request, error;
MSG #TIME &" $SEEV Received: "& #request;
IF error=1 THEN CALL HandleRequest(#request, #TASKIDLASTREAD);

HPE NonStop SeeView Manual Page 132 of 365


IF error=40 THEN SHUTDOWN;
END UNTIL #TAKE #request = "STOP";

When the SeeView program executes the script shown in Example 5-17, ?SECTION
ReadReceive declares a request taskid socket named Requestor. The section then
repeatedly reads the Requestor $receive socket. Each time a message is received, the
READ requestor PEEROK statement completes. If SERVERMODE=3, the request
appears as shown in Example 5-18.
Each time a WRITEREAD message is received, the ?PROC HandleRequest is called
to process the request contained in string variable #request. The taskid of the
requestor is also passed to the ?PROC HandleRequest with the intrinsic
#TASKIDLASTREAD. This intrinsic determines the taskid number of the last message
received since the PEEROK option was used.

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 $SEEV Received: FUP CREATE $DATA.TEST.A


15:09:02 $SEEV Received: FUP CREATE $DATA.TEST.B
15:09:08 $SEEV Received: FUP CREATE $DATA.TEST.C
15:09:10 $SEEV Received: FUP CREATE $DATA.TEST.D
15:09:14 $SEEV Received: FUP INFO $DATA.TEST.*

?PROC HandleRequest is called by section ReadReceive to process the request


received. The procedure parameter #request contains the name of a command
interpreter (ci) followed by the command that the server should issue to that command
interpreter. The procedure parses the #request parameter into local string variables
#ciname (FUP) and #cmd (INFO $DATA.TEST.*).
HandleRequest executes a statement to declare a TASK with the name #ciname
contained in #request and then executes a WITH #ciname to set the taskid of the
command interpreter to the local variable citaskid. The procedure then writes the
command contained in #cmd to the citaskid and waits for the command interpreter
to prompt. Once it prompts, the entire response from the command interpreter is
written back to the requestor in one large reply message containing multiple lines of
text delimited with carriage-return characters. See Example 5-19.

HPE NonStop SeeView Manual Page 133 of 365


Example 5-19. Requestor Reply Received From the Script in Example 5-17

1> SEEDIT MS $SEEV FUP INFO $DATA.TEST.*

INFO $DATA.TEST.*
CODE EOF LAST MODIF OWNER RWEP TYPE REC BLOC
$DATA.TEST
A 0 15:08 66,1 UUUU
B 0 15:09 66,1 UUUU
C 0 15:09 66,1 UUUU
D 0 15:09 66,1 UUUU
-

HPE NonStop SeeView Manual Page 134 of 365


Section 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 HPE conversational utility you choose and also add this capability to the
concurrent environment provided by SeeView, making SeeView users more
productive.
A SeeView script is a program written in the SeeView language that controls the
SeeView environment. Scripts provide a higher-level interface with point-and-click
menus and windows that control user-defined programs or utilities for NonStop
systems. Scripts are commonly used for various interactive-text-interfaces, bringing
menu and windowing capabilities to utilities for NonStop systems and terminals.
This section describes four main steps for successful programming in the SeeView
product:

 Familiarize Yourself With the SeeView Program


 Design the Presentation Interface
 Develop the Script
 Write User Documentation

Familiarize Yourself With the SeeView


Program
Use the following checklist to familiarize yourself with the SeeView program:

 Study the SeeView ISP and This Manual


 Understand the SeeView Program
 Understand Script Development on a Small Scale First
 Develop an Understanding of SeeView Statements
Study the SeeView ISP and This Manual
Familiarize yourself with the SeeView program by studying the SeeView Tutorial
Independent Study Program (ISP) and this manual. The ISP and this manual help you

HPE NonStop SeeView Manual Page 135 of 365


become familiar with the features, uses, and general programming statements used
with the product.

Reviewing Sample Scripts


This manual contains several sample scripts that you should review:

 Script examples in Section 5: SeeView Language Elements, Section 7:


SeeView Interpreter Interface, Section 8: SeeView Directives, and Section 9:
SeeView Statements and Script Symbols.

 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. Copy the SeeShell file to your printer to see the entire script.

Understand the SeeView Program


As a SeeView programmer, you need to make the transition from being a user of a
dumb TTY-mode terminal to being a SeeView user who uses the functions and
features of the SeeView program for everyday system use. Use the SeeShell as your
everyday interface to the NonStop system and use Seedit as an editor. Also use
external scripts such as SeeMeas, and SeeSQL, and the other user pages within the
SeeView environment before you begin script development.
The SeeShell file, referred to as the shell, defines the environment that appears when
you start the SeeView program. The shell‟s functionality uses utilities for NonStop
systems to accomplish various tasks and obtain information easily and accurately
through simple point-and-click menus.
The Seedit utility provides editing functions and also logging functions within the
SeeView environment. SeeView editing functions are similar to the EDIT VS (virtual
screen) editor except that the SeeView program provides these functions across
multiple windows and for windows that contain the output from processes (for example,
TACL).

HPE NonStop SeeView Manual Page 136 of 365


Understand Script Development on a Small Scale First
Create a small but useful script to familiarize yourself with the designing, editing, and
debugging phases on a smaller and less complex scale. This experience will also help
make the process clearer to you.

Develop an Understanding of SeeView Statements


In the SeeView program, you can often accomplish a single function in several
different ways, so you need a firm understanding of all SeeView statements and
capabilities to develop concise, efficient code. If you skip these steps and move
directly to the development stage, you might encounter problems later on. For more
details on SeeView statements and script symbols, see Section 9: SeeView
Statements and Script Symbols.

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
 Identify Which Types of Menus to Use
Design a Presentation Interface, Not a New Application
When you write a SeeView script, you are usually not writing a new application but
designing a new presentation interface to an existing application or utility.

HPE NonStop SeeView Manual Page 137 of 365


Understand the Product
If you do not understand the product for which you are designing the interface, you will
not be able to write a new presentation interface for it or simplify its complexity. You
must first understand what the product does and the steps necessary to get your
results. To develop an interface for your product in the SeeView program, you should
concern yourself more with what the interface does rather than how it does it. You do
not need to understand the inner workings or the source code that the interface is built
upon. You just need to understand the uses and functionality of the product and the
commands needed to achieve the results.

Use the Product as a New User


Imagine that you have never used the utility or seen the manuals and have only
glanced at the product‟s reference summary. Make mental notes about navigation and
the structure of command syntax. Pay particularly close attention to inconsistent and
consistent command syntax as it pertains to the objects for the interface you are
designing. Doing so will help you design logical menus as well as code actual
commands within your script.
For example, certain utilities have syntax inconsistencies where common commands
differ in use and syntax for different subsystems. Also, the command set could differ
depending on the type of object you are working with. Taking note of these
inconsistencies will help you design effective, easy-to-use menus. Noting
consistencies 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. For example, certain utilities
have the same consistent command structure for each command:
command [object-type] [object] [,attribute].[,attribute]
However, for other utilities, command structure can be inconsistent and can depend on
the type of object or subsystem used.
When you are confident of your ability to write the script and to understand the syntax
of the utility for which you are designing the interface, consult an experienced SeeView
user (if available) to discuss the presentation techniques. When talking with this
experienced user, discuss the design you are considering. You might discover a new
set of ideas for displaying information, basic operation, desired improvements, and the
most commonly used commands.

HPE NonStop SeeView Manual Page 138 of 365


Define What You Want Your Script to Accomplish
Before you proceed, you must clearly understand what you want your script to achieve,
whether it is simplifying an interface, improving the interface by providing a higher-level
of integration, or adding new functionality.

Establish Menu and Window Contents


Start thinking about the contents of menus and windows, but do not be concerned
about their sizes, locations, or types. Create your menus in a top-down format, moving
from the general to the specific by listing the contents of the first menu and breaking it
down. You might find an outline helpful.
Start with the main menu. For example, the main menu could be a division of the major
commands or functions, or the main menu could be a division of subsystems. If only
some of the commands reference all subsystems, you should organize the main menu
by subsystem, because each subsystem cannot be uniformly referenced by each
command.
The syntax of commands that can be executed for all subsystems is usually varied, so
dividing subsystems into individual parts with their own commands simplifies the
structure. As you continue to build your menus, they may become very detailed. Keep
in mind that you should probably change the menus as you continue.

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. This
simple rule is probably the most important one because most users have multiple
processes going on at the same time with many windows open on other pages. If
your script opens windows at random on other pages and removes other windows
from the screen, not only will you disrupt the environment, you will confuse the
user. As a general rule of thumb, pages 1 and 2 are reserved for the shell and
external scripts, and all other activity takes place on the remaining pages (page 3
through the last page).

 Design your scripts so they do not disturb the operation of the shell. You should
preserve the menus at the top of page 1 at all times. If you do not, you limit
severely the powers that common SeeView users are accustomed to, and they will
probably refuse to use the script because it manipulates their environment.

 Do not alter color settings. Once colors are changed, menus start to look like
windows, and windows start to look like menus. Such changes can be confusing.

HPE NonStop SeeView Manual Page 139 of 365


On a color terminal, some users are accustomed to seeing gray menus and blue
windows. Any deviation from the norm causes confusion and hesitation.

 Do not lock any of the function keys (through the SECURE command). Most users
who encounter a script that locks function keys will shut it down and purge it.
Leave the function keys unlocked unless you are writing a stand-alone shell for a
closed application environment.

Follow Human Interface Standards


Be consistent with the format of menu items, headings, and status messages. For
menu items, use single words with consistent uppercase and lowercase usage. For
example, subsystems could be listed on the main menu, with all items in uppercase.
For each submenu, all items could be in lowercase with the first letter capitalized.
Keep headings consistent for related areas. Consistent headings and menu items
make it easier for users to recognize their location and status when they move among
menus and windows. Consistent and descriptive messages are important for the same
reason.

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.

 Toggle: An item whose Boolean value changes when selected. The new value of
the item appears within the menu.

 Select: An item that offers a list of values when it is selected. The new value of
the item appears within the menu if a new value is selected.
Some scripts utilize all four types of menu items. Others only need standard menu
items.
The Toggle and Select menu items are useful for syntactically complex commands.
They provide extensibility when dealing with commands that have many attributes.
Toggle and Select menu items are used to minimize the chance of user error. Although
Toggle and Select menu items provide more variability in an interface, they can also
make the interface more confusing to use. If you are willing to limit some of the power
of an interface in exchange for ease of use, you might limit the initial design to

HPE NonStop SeeView Manual Page 140 of 365


standard and input menu items only. If you use Toggle and Select menu items, make
sure they redraw the menu they were called from because their values change.
Once you have determined the types of menus you need, you must decide where to
put them. Try to contain your script to page 1 entirely to minimize disorientation.
However, using a second page is not necessarily a bad practice. It can be appropriate,
when it provides cross-reference information. For example, you could have a Select
menu with many attributes on page 1. If you want help for the attributes, you can
create a HELP window on page 2. You could then display an advisory message
indicating that help for selection attributes is available on the next terminal page. The
environment on page 1 remains intact so that the user can switch back and forth,
moving between the help and the set of menus.

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.
The menu cache is the memory where the menu text is stored. It is not the same as
the menu that appears with a WINDOW statement. It does not matter if SeeView has
not been told what to do with the text or if procedures are being referenced that do not
yet exist. This makes top-down implementation straightforward.
Next, declare a section with a ?SECTION directive and use a WINDOW ... MENU
statement to display the main menu. Then you are ready to code the major
functionality of the script.

HPE NonStop SeeView Manual Page 141 of 365


Use Relative Menu Locations
In general, try to design the menus so that the main menu is never erased or covered
up. Menus other than the main menu should have relative, not absolute locations. Use
the BESIDE and BELOW statements, as well as the SeeView intrinsics #MENULINE,
#MENUCOL, #MENUWIDTH, and #MENUHEIGHT to achieve relative menu
positioning. These SeeView intrinsics are symbolic names associated with values that
are intrinsic to the environment. For example, #MENULINE and #MENUCOL are the
line and column number on the screen of the most recently referenced menu. Working
with these intrinsics makes it easy to move everything around later.
For example, if the width of the main menu is increased by 10, a script should still
function, and no windows should be overdrawn. Try to follow this rule although it might
not be possible at all times.

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. To reduce the total number of TCBs
and memory a script uses, you might want to use one menu cache to store the text for
multiple physical menu windows.
You can logically divide the single ?MENU into pieces. Logical menus begin with a
target name and end with another target, such as an asterisk (*). When you declare
the menu window, the cache location to be displayed is indicated by a CACHE target
UNTIL another target name occurs. For example:

?MENU mymenu
-DevTypes
DISC
PRINTER
TAPE
*
-Commands
LISTCACHE
LISTDEV
. . .
*
?SECT main
WINDOW mymenu MENU ___________
CACHE /-DevTypes/ | DISC |
UNTIL /*/ | PRINTER |
HEAD "" | TAPE |
OFFSET 0,1; |___________|

HPE NonStop SeeView Manual Page 142 of 365


The OFFSET of 1 is used to vertically offset the cache display by 1, so that the target
label /-DevTypes/ does not appear.
A unique character such as a hyphen before the target name makes the name easier
to find. There are exceptions to using one menu cache. At times you will need more
than one menu cache.

Use Default Productions


A production contains the SeeView statements associated with a menu item. When a
menu item is selected, the statements are executed. Each menu item has either a
specific production or a default production associated with it. The default production is
executed when a menu item has no specific production. Different menu items within a
single menu often require the same functionality. The default production provides a
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.
The use of default productions not only drastically reduces cache memory usage but
also provides a simple way to define, only once, the rule to be associated with a list of
perhaps thousands of menu item objects. This approach has significant performance
advantages because you need not generate a discrete production for each menu item
in a cache. In some cases, you do not need to wait for a cache to fill with menu items.

Write Your Procedures


Procedure development in SeeView is different from development with a compiled
language on a NonStop system because the SeeView program is an interpreter and
has a built-in development facility that allows you to develop, edit, execute, debug, and
test scripts without ever exiting from the SeeView program. In fact, your SeeView script
is just another EDIT file in the SeeView environment.
Do your development from the Help page using the SeeView window. (Access it by
pressing F11 twice.) From the Help page you can access online help and edit,
execute, and debug your script. A thorough understanding of the editor and its use can
cut your development time in half, especially if your script is large.
Develop scripts in groups of 1 to 10 lines at a time. Press SF15 to execute your script
as you develop it. Use the online HELP command, display variables with the PRINT *
statement, and use ALTER STMTTRACE ON for full statement tracing to the free
window cache. If you understand and use these features, you can efficiently write and
debug a script.
Write the procedures associated with the main menu first. You can use as many
procedures as you need, as long as they are clear and concise. Do not try to do too

HPE NonStop SeeView Manual Page 143 of 365


much from a menu production. If you can not fit what you are trying to do into the
production, write a procedure and call it from the production.

Comment As You Code


Comments in your code make future maintenance much easier. Some guidelines for
maintenance and installation include:

 Make descriptive comments before all procedures.


 Use comments to explain all variables and parameters where they are declared.
 Include installation procedures if any are needed.
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. Entering PRINT * from the free window on the Help page displays the
current values of all local and global variables. As the script evolves, you might
circulate a copy through electronic mail to your users or reviewers and wait for
suggestions on modifications.

Write User Documentation


Once you complete your script, you are ready to write user documentation for the
script. The best way to do this is through the SeeView program.
If you are using a PC, you can use the following technique to make your
documentation more convenient to write. Issue the command ALTER FRAMEALPHA
ON. Then recover by pressing SF14. Go through the script, displaying each screen. As
you do this, use the Save Screen-to-Savefile option (SF11). This option stores a copy
of each screen in TGAL format.
When you have stored all the screens in the EDIT savefile, edit the savefile and write
the documentation for each screen. If your design is top-down, the document will be
organized in the same way, and the organization will be clear.

HPE NonStop SeeView Manual Page 144 of 365


Section 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. Entering HELP statement or HELP function-key
provides a reference description of the statement or function key specified.

Menu Production
You can also execute statements from menu productions. If you place the cursor in a
window declared as a menu and press Return, the line designated by the cursor is
analyzed to determine if it contains a production symbol (<==). If it does, the SeeView
statements to the right of the symbol are executed. This provides an extremely simple,
and convenient way to execute SeeView statements.
SeeView statements can also be associated with menu items that do not contain a
production symbol. The WINDOW statement lets you associate a default production
and a shift production with a menu. You can execute a default production by pointing
the cursor to a menu item that does not contain a production symbol and pressing
Return. You can execute a shift production when you select any menu item and press
Shift-Return.
Default productions and shift productions provide a powerful way of associating
procedural rules with entire sets of menu items and the objects that they represent.

HPE NonStop SeeView Manual Page 145 of 365


Disk Files or Text Caches
You can use the INVOKE statement to execute SeeView programs contained in any
EDIT file or memory cache.
In addition, you can execute the file-name or cache specified with the ALTER
SHELL statement by pressing SF15. This action is referred to as reshelling. The
SHELL file name is initially determined according to the rules described in Appendix
A: Running the SeeView Program.

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.
You can use the Seedit GET command to load any program or script file into the
SeeView window.
To set up the Help page for interactive debugging:
1. Press F11.
Once the Help page appears, press F11 a second time. A window editor labeled
SeeView is automatically created in the largest free window on the Help page.
Breaking up this window into a larger SeeView window and a smaller free window
below it provides a convenient means of displaying syntax errors and user variable
values.
2. Load the SeeView command files into the SeeView window on the Help page by
using the Seedit GET command.
3. Enable edit mode for the SeeView window by pressing Insert-Line or F5 when the
cursor is on the sill of this window.
4. Once the editor is enabled, press SF15 when the cursor is in this window to
execute all statements contained in the cache for this window.
If the program causes another page to appear, you can return to the Help page by
pressing F11.
Specifying a section through the ALTER SHELL file [ ( section-name) ] statement
restricts SF15 execution to a specific ?SECTION section-name within the target
shell.

HPE NonStop SeeView Manual Page 146 of 365


Figure 7-1Error! Bookmark not defined. shows an example of a program contained
in a window on the Help page. This program displays a menu of utility names that you
can use to start the utilities on selected pages of the terminal.
The window below the SeeView window is a free window that you can use to display
syntax errors, variable values (PRINT statement), and execution traces (ALTER
STMTTRACE ON).

Figure 7-1. Example of Edit-Mode Language Interface on the Help Page

VST701

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).
 The column number where the error was detected (column 9).
Example 7-1 shows an example of a user-defined SEECSTM script that provides
vectoring to different terminal pages based on the menu item selected.

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.

HPE NonStop SeeView Manual Page 147 of 365


{ PERUSE Peruse on page 6.
{ TACL2 2nd TACL on page 7.
{------------------------------------------------------------------}
Seedit1 <== CALL PageTask ( 3, "seedit1 := seedit cache 100" )
Seedit2 <== CALL PageTask ( 4, "seedit2 := seedit cache 200" )
TACL1 <== CALL PageTask ( 5, "tacl1 := tacl" )
PERUSE <== CALL PageTask ( 6, "peruse := peruse" )
TACL2 <== CALL PageTask ( 7, "tacl2 := tacl" )
*
?PROC PageTask { pg, #taskstmt }
{------------------------------}
{ Declare and display a task on requested page. Window existence is checked
{ by building WITH taskid stmt, executing it, and checking #taskpageno.
{ parameters are pg, #taskstmt text.
{-----------------------------------------------------------------------}
PARM pg; { 1st parm is page number
PARM #taskstmt; { 2nd parm is TASK .. stmt
VARIABLE #s := "TASK " & #taskstmt; { Build TASK tasksyntax stmt
EXECUTE #s; { Execute TASK .. stmt
#s := "WITH " & #TAKE #taskstmt; { Build WITH taskid stmt
EXE #s; { Execute WITH .. stmt
IF #taskpageno THEN BEGIN { If Window exists for task
PAGE #taskpageno; { then just show that page
RETURN; { and Return.
END;
PAGE pg; { Window doesn't exist
WINDOW #taskid CACHE LASTLINE; { Build one on page pg

?SECT Main
{---------
{ Popup mymenu below last referenced menu
{----------------------------------------
BELOW; { Position below caller's
CLEARW; { menu, and clear any windows.
WINDOW MyMenu MENU CACHE UNTIL /*/; { window on mymenu menu

HPE NonStop SeeView Manual Page 148 of 365


Section 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. Interpreter directives provide structural information to the SeeView
program about the text following them.

MENU
The ?MENU directive declares a menu taskid name and the contents of the cache
memory associated with that name. Each line of text following the directive is stored in
the cache defined by taskid.

?MENU taskid [ TASK statement syntax ]

The WINDOW statement displays the cache contents in windows or menus. When you
declare a window as a menu:

 Each line of cache containing the production symbol (<==) represents a menu item
that you can invoke by pressing Return. For example:
Viewsys <== run viewsys

 The prompt production symbol (<==?) represents a menu item that you can invoke
and have data passed through an input field defined on the left side of the
production symbol. For example:
Enter \system: [ ] <==? #system := #menuinput
To invoke a production, place the cursor on that production‟s line in a menu and press
Return.
The text on the left side of the production symbol is the text that you see in the menu
window. On the right side of the production is a set of statements that the SeeView
interpreter executes.
The TASK statement syntax portion of the ?MENU directive enables you to specify
menu options. These options include TASK statement options. Common TASK
statement options that you might want to use with the ?MENU directive include the
CACHEPAGES and SORTED. For detailed descriptions, see the
TASK statement in Section 9: SeeView Statements and Script Symbols.

HPE NonStop SeeView Manual Page 149 of 365


Example 8-1 Error! Bookmark not defined. shows how to use the MENU directive.

Example 8-1. Example of MENU Directive

?MENU items
{---------}
Dates <== CALL dates { call parm = ""
Today <== CALL dates ("today") { call parm = "today"
January <== CALL dates ( "1/1" ) { call parm = "1/1"
February <== CALL dates ( "2/1" ) { ..
March <== CALL dates ( "3/1" )
April <== CALL dates ( "4/1" )
May <== CALL dates ( "5/1" )
..
December <== CALL dates ("12/1" )
[ ? ]<==? CALL dates (#menuinput) {

?PROC DATES { #cmd }


{------------------}
{ if #cmd ="" popup dates menu
{ if #cmd<>"" then "text" in #cmd implies do that DATES "text"
{-----------------------------------------------------------------------}
PARM #cmd; { call parm stored in #cmd
TASK dates; { assert dates process
IF #taskstart THEN BEGIN { if task was just started then
WRITE dates,"months 2"; { initialize process by writing
WRITE dates,"term zentec"; { various command parameters to it
WRITE dates,"int pagelines 19";
END;
IF #cmd="" THEN BEGIN { if #cmd="" implies popup dates menu
BELOW; CLEARW; { erase windows below current menu
WINDOW [] MENU CACHE/today/ FOR 14;{ popup menu on months of year
RETURN; { return control to clicker
END;
IF #cmd="today" THEN #cmd:=#date[4:8];{ set #cmd to todays date in #date

BESIDE; { popup a Dates window beside menu with


WINDOW dates, "dates " & #cmd { the command to Dates being "DATES "&
NOCURSOR NOFRAME; { #cmd. Don't move cursor/redraw frame.

?SECT ShowMenus
{-------------}
{ Show initial base menus
{------------------------}
VAR h := 3; {default front page menu height
VAR w := 13; {menu width
PAGE 1;

WINDOW items MENU CACHE/dates/ SIZE w,h HEAD "Calendar";

HPE NonStop SeeView Manual Page 150 of 365


PROCEDURE
The ?PROC directive identifies a block of SeeView statements that you can execute
with a CALL statement.

?PROC procedure-name

The lines of text following the ?PROC procedure-name directive represent SeeView
statements associated with procedure-name. Another directive, or end of file,
marks the end of the procedure.
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. A procedure can display a menu, which can invoke a
procedure, which in turn can display a menu, and so on. This technique helps to
formalize and externalize the calling interface between procedures and menus and
promotes user control of complex functions.
For an example of a procedure called from a menu, see Example 8-1Error! Bookmark
not defined..

SECTION
The ?SECT interpreter directive identifies groups of SeeView statements that are
automatically executed when you invoke a script file or cache with the INVOKE
statement or SF15, or when you first start a SeeView program.

?SECT section-name

The ?SECT section-name directive indicates the beginning of a section starting in


column one of a line. When you first start the SeeView program, all sections in the
current shell file are executed. After the SeeView program is running, sections
contained in source files are executed in one of two ways:

 An INVOKE statement executed from either a menu production or a section


executes all sections in the specified file or cache. In this way, a menu invokes
external user menus and sections (for example, SEECSTM).

 When you press SF15, sections are executed in the shell file or cache defined by
the ALTER SHELL statement. Press SF15 to reinvoke the shell setup (for
example, SeeShell).

HPE NonStop SeeView Manual Page 151 of 365


Sections provide a way to externally initialize an environment (for example, declare
additional menus and procedures). See also the INVOKE statement on page 212.

SEEVIEW
The ?SEEVIEW interpreter directive identifies the version of the SeeView interpreter
needed to execute the script containing this directive. If the version of a SeeView
program is older than the directive specifies, the old version of SeeView does not
execute the script and issues a warning message. You can protect new scripts that
use new SeeView syntax from accidentally being executed by older versions of the
SeeView interpreter.

?SEEVIEW version

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. So that user can get TACL
{ help by typing on the SILL and pressing F16.
{--------------------------------------------}
PAGE #LASTPAGE;
TASK TACL;
WINDOW TACL CACHE LL KEYS SILL F16
PRODUCTION "CALL PassFkeyCmd(Tacl)";

?PROC PassFkeyCmd(tid);
{---------------------}
{ Pass fkey pressed to taskid=tid along with cmd on the sill
{ Note that the task expects the terminal fkey data stream,
{ so we must build the <SOH> <fkey> <row> <col> data stream.
{-----------------------------------------------------------}
PARM tid;
VAR #s
, #fkeyTransform:= "@ABCDEFGHIJKLMNO" & { f1..f16
"`abcdefghijklmno" & { sf1..sf16
"PQRSTUVW" & "pqrstuv" { others
, #fk:=#char(1) & { <soh>
#fkeyTransform[#fkey] & { <fkey> code
#char(32+0) & { <row>
#char(32+#fkeycol-#menucol-1) { <column>
;
WITH tid; { pickup old prompt

HPE NonStop SeeView Manual Page 152 of 365


#s := #TASKPROMPT & #MENUINPUT; { #menuinput is sill input
WRITE tid, #MENUINPUT & #fk; { write cmd & fkey to tid
WRITE tid CACHE -1 UPDATE,#s; { suppress #fk in cache
LINE #MENULINE,#MENUCOL; { update window

WINDOW tid CACHE LASTLINE


SIZE #MENUWIDTH,#MENUHEIGHT
PRODUCTION #MENUPRODUCTION
KEYS SAME NOFRAME;

HPE NonStop SeeView Manual Page 153 of 365


Section 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.
The detailed information about each statement includes:

 The purpose or function of the statement


 The complete statement syntax
 A description of the available statement options
 One or more examples illustrating the use of the statement
Table 9-1. SeeView Statement Summary and Abbreviations
Statement Abbrev. Description
ACCEPT Reads multiple fields from screen
ALTER A Alters specified options
BEGIN Marks the beginning of a compound statement
BELL Causes the terminal audible alarm to sound
BELOW Positions below last referenced menu
BESIDE Positions beside last referenced menu
BREAK BRK Sends a break message to the specified task
CALL Calls a SeeView procedure
CI Executes SeeView in command interpreter (CI) mode
CLEAR C Clears the current terminal page
CLEARW CW Clears (deletes) windows in specified area
CURSOR Moves cursor to the specified location
DECLARE DEC, VAR Declares user variables
DELAY Causes the terminal to delay
DELETE Deletes all text in cache
DISPLAY Displays data in a fields window
DO Provides DO UNTIL iteration looping construct

HPE NonStop SeeView Manual Page 154 of 365


DOWN D Moves screen buffer address down
END Marks the end of a compound statement
EXECUTE EXE Executes SeeView statements contained in a string
FLUSH FL Outputs current screen buffer
FOR Provides FOR iteration construct
FRAMEVIDEO FV Alters window frame characteristics
GOODBYE Logs off from the SeeView program
GRAPH G Draws histogram of specified data
HELLO Logs on to the SeeView program
HELP Displays help for function keys, statements, and intrinsics
HISTORY Displays command history
IF Provides conditional IF statement
INFO Displays information about SeeView procedures
INVOKE Invokes specified SeeView script file/cache
LEFT L Moves screen buffer address left
LET Delimits integer assignment statement
LINE Defines current screen buffer address
LINE25 Emits a line-25 escape sequence
LISTDEV Puts device names into a task‟s cache
LOAD Loads a text file into a task's cache
LOCK / Locks or unlocks keyboard
UNLOCK
Displays video highlighted text on line 25
MSG
Specifies new shell file and default volume
ON
OPEN O Declares, starts, and builds window on a task
PAGE Displays specified terminal page
PAGEMSG Displays video highlighted Page n of m message
PARM Declares procedure parameters
PLOT Defines current screen buffer address
POP Removes line of text from a cache
PRINT Displays user variables or expressions
PROMPT Prompts the SeeView output file for input in CI mode
PUSH Puts line of text into a cache
READ Reads a line of text from a user task or cache

HPE NonStop SeeView Manual Page 155 of 365


Exits current SeeView procedure
RETURN
RIGHT R Moves screen buffer address to the right
RULER Draws ruler
RUN Releases control of terminal to RUN specified program
SAVE Saves specified file to disk
SCAN Scans string until target
Searches cache for target text
SEARCH
SECURE Enables or disables statements, function keys, or both
SETPAGE SET Specifies off-screen I/O page only
SHOW Specifies display page only
SHOWPAGE
SHUTDOWN Shuts down the SeeView program programmatically
STATUS Displays status of user tasks
STOP Stops a specified user task
Declares a user task
TASK
TRANSLATE Defines CACHEFILTER translation table
UP U Moves screen buffer address up
VARIABLE VAR, DEC Declares user variables
V Sets video attributes at current address
VIDEO
Sets wait seconds
WAIT
Provides WHILE iteration construct
WHILE
WINDOW W Builds window or menu at current address
WITH Defines current with taskid for #TASK ... intrinsics
Writes line of text to specified task or cache
WRITE
WRITEREAD WR Writes string to terminal and reads result

Table 9-2. SeeView Script Symbols


Symbol / Name Description
The left parenthesis begins an expression or group

HPE NonStop SeeView Manual Page 156 of 365


Parentheses ( ) expression, and the right parenthesis ends it.

Brackets [ ] The left bracket begins the display of a list of strings, and
the right bracket ends it.
Delimits an end-of-line comment.
Left Brace {
Quotation Mark “ Displays string expression at current address.
Pound Sign # Begins a string assignment statement, string operator, or
string intrinsic.
String operators return information about the contents of
String Operators and a string variable. String intrinsics return information about
String Intrinsics the entities they represent.

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.
The screen area to be accepted is defined by the area of the window located at the
current buffer address unless you specify the AREA option. Data is accepted
regardless of how modified-data-tags are set for fields in the defined area.

ACCEPT [ #string-var [,#string-var]... ]


[ ERROR integer-var ]
[ FKEYWAIT ]
[ INTO taskid [ FIELDPERLINE ] ]
[ PROTECTED | UNPROTECTED ]
[ TIMEOUT seconds ]
[ TRACE taskid ]
[ WINDOW | AREA row [,column [,width [,height ] ] ] ]

#string-var [,#string-var ]
specifies that data is to be mapped onto the string variable list as it is received
from the terminal in a left-to-right, top-to-bottom basis.
The data from the first field received from the terminal is stored in the first string
variable in the list, the next field data is stored in the second string variable, and so
on. The values accepted into the string variable list depend on how the WINDOW
options NOGLASS or NOPROTECT are specified for the windows being accepted.

HPE NonStop SeeView Manual Page 157 of 365


Accepting data from a NOGLASS or NOPROTECT window causes additional
fields to be mapped into the variable list. To avoid confusion, use the WINDOW
GLASS option for any menu input window that is to have an ACCEPT string
variable list operation performed against it.

ERROR integer-var
assigns the file-system error to the specified integer variable (integer-var).
When you specify the ERROR option, input-output operation errors are not retried.
Instead, they are returned in the error variable. Because the SeeView program
automatically handles input-output operation errors that occur during the execution
of an ACCEPT statement, use of the ERROR integer-var clause is considered
an advanced scripting technique.

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. If they are pressed, the
#FKEY intrinsics #FKEYCOL, #FKEYDELETELINE, #FKEYINSERTLINE,
#FKEYLINE, #FKEYNEXTPAGE, #FKEYPREVPAGE, #FKEYRETURN,
#FKEYROLLDOWN, #FKEYROLLUP, #FKEYSNEXTPAGE, #FKEYSPREVPAGE,
#FKEYSRETURN, #FKEYSROLLDOWN, and #FKEYSROLLUP return values for
nonnumeric function keys. (For details, see String Intrinsics on page 304304.)
The FKEYWAIT option is referred to as a modal operation. The FKEYWAIT option
results in a wait state or mode. The FKEYWAIT option is not recommended if you
want to preserve the modeless, nonhierarchical interface that the standard
SeeShell provides.
The FKEYWAIT option is useful for implementing modal dialog mechanisms such
as dialog boxes and function-key-driven operations.
To maintain script context, use the WINDOW MENU option to associate the
desired screen-handling procedure with the input menu. You need not use the
modal FKEYWAIT option to maintain script context.
This example shows the FKEYWAIT option:

?PROC PersonMaint{Accept input, wait for fkey.


{----------------------------}{Do table maint, based on fkey.
LINE #menuline, #menucol;{Define menu area for accept.
MSG "Press F1-Select, F2-Delete, F3-Insert";FLUSH
ACCEPT #name, #address, #phone FKEYWAIT;{Accept wait on fkey.
TASK sqlci;BELOW
IF #FKEY = 1 then WINDOW sqlci, "SELECT * FROM PERSON ...";

HPE NonStop SeeView Manual Page 158 of 365


IF #FKEY = 2 then WINDOW sqlci, "DELETE * FROM PERSON ...";
IF #FKEY = 3 then WINDOW sqlci, "INSERT * FROM PERSON ...";

INTO taskid [ FIELDPERLINE ]


appends the data received from the terminal to the end of the cache associated
with taskid.
You can use the INTO option to implement features that benefit from iteration,
such as accepting a list of objects marked with an x and then iteratively reading
through the cache to see which items are marked.
The INTO option without the FIELDPERLINE option provides a means of creating
an approximate image of the screen area being accepted. For example, if the first
data received is from line 3 and column 10 of the ACCEPT area, the first line in the
cache is from (3,10), and columns 1 through 9 are blank-filled.

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. For example, if data is from column
10 of the ACCEPT area, the data in the cache is blank-filled with nine blanks
and then the data. Fields that contain escape sequences are not mapped into
the cache. Data is offset in the cache relative to the area being accepted and
not relative to the data‟s absolute screen address.

PROTECTED
specifies that both protected and unprotected fields are to be read. PROTECTED
uses the T6500 terminal Read With Address All ESC ']' area sequence to accept
both PROTECTED and UNPROTECTED fields within the specified area.

Note. HPE recommends that the PROTECTED option be used only with the INTO
option. The PROTECTED option with an ACCEPT to a list of string variables is not
recommended because the PROTECTED option causes many extra fields to be
accepted. Storage is thus dependent on the fields generated by WINDOW options such
as GLASS, NOGLASS, and PROTECT.

HPE NonStop SeeView Manual Page 159 of 365


UNPROTECTED
specifies that only unprotected input fields are read. UNPROTECTED causes the
T6500 terminal Read Buffer ESC '<' sequence to be used to accept unprotected
input fields from the specified area regardless of how modified data tags are set.
This is the default.

TIMEOUT seconds
specifies the maximum number of seconds a script is to wait for the FKEYWAIT
operation to complete before SeeView cancels the ACCEPT and returns control to
the script. To determine if a timeout occurred, use the ERROR option and check if
the error variable has a value equal to 40. For example:
ACCEPT FKEYWAIT TIMEOUT 5 ERROR err;
This command returns a value of err=40 if a timeout occurred.

TRACE taskid
indicates that data received from the terminal is appended to the end of the cache
associated with taskid.
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. The cache
associated with this taskid is the cache that the ACCEPT statement applies to.

WINDOW
specifies the screen area to be accepted.
WINDOW is the default and implies that the area to be accepted is defined by the
dimensions of the window or menu located at the current buffer address. When
you do not specify a window or menu at the current buffer address, the area to be
accepted is the default value of 1,1 for 80 wide by 24 high.

AREA row [,column [,width [,height ] ] ]


specifies the exact area to be accepted and overrides the default WINDOW option.
AREA defines the ACCEPT region to be the rectangular area whose upper-left
corner is defined by row,column and whose size is defined by width, height.

HPE NonStop SeeView Manual Page 160 of 365


row
indicates the vertical row or line location.

column
indicates the horizontal column location.

width
defines the width of the area.

height
defines the height of the area.
This example shows the AREA option:
AREA 1,1,5,3 includes fields from:

1,1 .. 1,5 { where r,c represent row,column


2,1 .. 2,5
3,1 .. 3,5

and excludes all fields from:

1,6 .. 1,80
2,6 .. 2,80
3,6 .. to end of screen.

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; {Define menu area for accept.
VAR #name, #address, #phone; {Declare vars to accept into.
ACCEPT #name, #address, #phone; {Accept into string vars.

TASK sqlci;
BELOW; {Sqlci window below input menu
WINDOW sqlci, "INSERT INTO PERSON (*) VALUES (" &
"'" & #name & "',"
"'" & #address & "',"
"'" & #phone & "');"

?SECT GetPersonMain

HPE NonStop SeeView Manual Page 161 of 365


{------------------}
LINE 4;
WINDOW person MENU "call GetPerson" { Call accept proc.
CACHE FIRST UNTIL /*/ SIZE 35 { Size menu.
GLASS; { GLASS required!!

This menu data is read in a single input operation with the ACCEPT statement in the
preceding example:

ALTER
The ALTER statement displays or alters various configuration parameter values.

ALTER [ VOLUME vol-subvol ]


[ INVOKEVOL vol-subvol ]
[ SHELL [ filename | CACHE taskid ] [ section ] ]
[ SAVEFILE filename ]
[ TRACEFILE filename ]
[ HELPFILE filename ]
[ KEYS window-keys-options ]
[ PRODUCTION string-exp ]
[ SHIFTPRODUCTION string-exp ]

[ ASCII8 ON | OFF ]
[ AUTOLOGOFF minutes ]
[ BOLDLINE25 ON | OFF ]
[ CACHEFILTER ON | OFF ]
[ COLORTABLE ON | OFF ]
[ DATATIMEOUT seconds ]
[ DEVTYPE PROCESS | TERM ]
[ DICTVOL vol-subvol ]
[ ECHOSUPPRESS ON | OFF ]
[ ERRORSTOP ON | OFF ]
[ FIFOPEER ON | OFF ]
[ FRAMEALPHA ON | OFF ]
[ FRAMEVIDEO ON | OFF ]
[ HIGHPINTASKS ON | OFF ]
[ INVERTGRAPH ON | OFF ]
[ IOTRACE ON | OFF ]
[ JOINTEXT ON | OFF ]
[ JOINWIDTH line-length ]
[ KEYSUPPRESS ON | OFF [ window-keys-syntax ] ]

HPE NonStop SeeView Manual Page 162 of 365


[ LOGONSTRONG ON | OFF ]
[ LOOP ON | OFF ]
[ MENUSTATUS ON | OFF ]
[ MSGTRACE ON | OFF ]
[ MODEMWAIT seconds ]
[ MULTIWINDOWS ON | OFF ]
[ NODATATIMEOUT seconds ]
[ PRIORITY priority ]
[ PRIVATE ON | OFF ]
[ PROCTRACE ON | OFF ]
[ QUEUE ON | OFF ]
[ RECVTRACE ON | OFF ]
[ REFRESH seconds ]
[ RETAIN ON | OFF ]
[ SECTIONDELAY seconds ]
[ SECTIONMSG ON | OFF ]
[ SETMODE110 ON | OFF ]
[ SILLERASE ON | OFF ]
[ SILLSCROLL ON | OFF ]
[ STATISTICS ON | OFF ]
[ STMTTRACE ON | OFF ]
[ 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.field name form of the GRAPH statement is used.
(See the GRAPH statement.) The data dictionary is generated with the
DDL compiler. Specify ALTER DICTVOL vol-subvol to separate the
dictionary specification from the default volume.

HPE NonStop SeeView Manual Page 163 of 365


INVOKEVOL vol-subvol
specifies the current default vol-subvol for INVOKE statements executed by
SeeView. Partially qualified file names referenced by an INVOKE statement are
expanded using this vol-subvol.

SHELL filename | CACHE taskid [ section ]


specifies the current SHELL designated by filename or the CACHE associated
with the taskid. All sections contained in the shell file are invoked when you
press SF15. The shell file is initially set either to a file named SeeShell or to the IN
disk file specified when the SeeView program was started.

filename
specifies the name of the shell file.

CACHE taskid
specifies a symbolic variable name that indicates the cache containing a shell.
For additional information, see the
TASK statement.

section
invokes only the sections with this name. For more information, see Section 5:
SeeView Language Elements.

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.

HELPFILE filename
specifies the name of the EDIT file that contains the help text for the HELP
command. This Help file can be any EDIT file with keywords starting in column
three.
Keywords are any text that a user would like to obtain help for. To obtain help on
new features, the user would enter the statement HELP NEW FEATURES. The
Help file should contain the words NEW FEATURES starting in column three of a

HPE NonStop SeeView Manual Page 164 of 365


line and be followed by text starting in column four (or higher) that describes the
new features.
The default file name for the Help file is SEEVIEWS, which stands for SeeView
syntax/semantics and resides on the same volume and subvolume as the SeeView
object file. The filename can be a string expression.

KEYS window-keys-options
defines global function key actions to be applied to subsequent window statement
declarations. The syntax for this ALTER option is the same as for the KEYS option
of the WINDOW statement. For more information, see the WINDOW statement.

PRODUCTION string-exp
defines a global default production to be applied to subsequent WINDOW
statement declarations. For example:
ALTER PRODUCTION "CALL CutPaste"
causes subsequent WINDOW statements to be declared with a default production
equal to “CALL CutPaste”. When you press Return, that production is executed.
This action associates a general purpose production with all subsequent window
declarations in the current environment.
Use ALTER PRODUCTION “” to reset the global definition.

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. This action associates a general purpose production with subsequent
WINDOW declarations in the current environment.
Use ALTER SHIFTPRODUCTION “” to reset the global definition.

ASCII8 ON | OFF
performs a “setmode 23” set character size. The ON option sets the character size
to 8 bits. OFF sets the size to 7 bits. The default setting is OFF.
The ASCII8 ON option provides multinational language support for extended ASCII
as specified by ISO 8859/1. This option used in conjunction with the TRANSLATE
statement supports a variety of 8-bit character sets.
Each time ASCII8 is altered ON or OFF, a TRANSLATE INITIALIZE operation is
automatically performed.

HPE NonStop SeeView Manual Page 165 of 365


Set the terminal character size configuration to 8 (ON) or 7 (OFF) when the ALTER
ASCII8 setting is ON or OFF.

AUTOLOGOFF minutes
causes the SeeView program to automatically log off when no function keys have
been pressed for the specified time interval. To enable this option, specify a
nonzero time in minutes. For additional information regarding logon and logoff, see
the GOODBYE and HELLO statements.
The default values is zero (0). If you do not specify the option, the feature is not
enabled.

BOLDLINE25 ON | OFF
specifies that line 25 messages, which are also stored in the free message cache,
are highlighted in reverse video (BOLDLINE25 ON).
The default is ON. If you do not specify the option, the feature is enabled. That is,
line 25 messages that are written to cache are highlighted with reverse video.

CACHEFILTER ON | OFF
specifies whether interprocess messages received by SeeView from user tasks
are filtered. CACHEFILTER ON filters out all illegal non-ASCII characters such as
communications and terminal control characters.
The default is ON, and it is the recommended setting.

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.

DATATIMEOUT seconds
specifies the default timeout value in seconds assigned to user tasks declared
with the OPEN or
TASK statements.
A DATATIMEOUT occurs when the arrival rate between messages from a process
exceeds the specified number of seconds. DATATIMEOUT occurs only after data
has been received from a user task in response to a request for data from that
task. Timeouts provide a way to limit the amount of time the SeeView program and
the SeeView interpreter wait for operations such as

HPE NonStop SeeView Manual Page 166 of 365


WRITE, READ, OPEN, and WINDOW to complete. They also prevent external
deadlocks from affecting the SeeView program.
The default value is 15 seconds.

DEVTYPE PROCESS | TERM


specifies the default device type that SeeView emulates. TERM stands for
terminal.
The DEVTYPE option is meaningful when the SeeView object file is set as
subtype 30. To do this, issue the binder command BIND CHANGE SUBTYPE 30
IN SEEVIEW.
The TACL, COMINT, and Seedit object file names default to device type 0,0. The
FUP, INSTALL, SPOOLCOM, and TESTPROC object file names default to device
type 6,0.
The default value is DEVTYPE PROCESS except for FUP, SPOOLCOM,
TESTPROC, and INSTALL.
Use the
TASK and OPEN statements to override the DEVTYPE option.

DICTVOL vol-subvol
specifies the location of the volume and subvolume of the DDL-generated data
dictionary used by the GRAPH statement. If you do not specify ALTER DICTVOL,
the default location for the data dictionary is the same as the ALTER VOLUME
volume and subvolume. By specifying the location of the DICTVOL, you can
separate the location of the data dictionary from the default volume.

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.

ERRORSTOP ON | OFF
tells the SeeView interpreter to stop interpreting statements when a syntax or run-
time error occurs and displays the statement where the error occurred in the
largest free window on the Help page.
The default is ERRORSTOP ON. When you set ERRORSTOP OFF, an error does
not stop the interpreter, but causes the SeeView interpreter to skip to the next
section in the current script or shell file.

HPE NonStop SeeView Manual Page 167 of 365


FIFOPEER ON | OFF
specifies whether peer process prompts are processed in first-in-first-out (FIFO)
order or in last-in-first-out (LIFO) order. The default is FIFO off because the most
recent conversational command interpreter prompt is normally processed first.
ALTER FIFO OFF is typically used in block-mode. ALTER FIFO ON is typically
used in server-mode scripts that need to process peer process requests in FIFO
order. ALTER FIFO ON means requests are processed in the order received.

FRAMEALPHA ON | OFF
specifies whether window frames are drawn using alternate graphic characters
(FRAMEALPHA OFF) or drawn with standard ASCII characters such as |_|
(FRAMEALPHA ON).
FRAMEALPHA ON permits the SeeView program to work with some T65xx
terminal emulators that do not support alternate character sets; for example, the
T6526 terminal.
The default is FRAMEALPHA OFF for all terminal types except the T6526 terminal.
This option is set by the standard SeeShell.

FRAMEVIDEO ON | OFF
specifies whether window frames are drawn using video attributes (FRAMEVIDEO
ON) instead of alternate graphic or alpha characters (FRAMEVIDEO OFF). ALTER
FRAMEVIDEO ON allows the SeeView program to work with any T65xx terminal
emulators that do not support alternate character data. For information about how
to define the video attributes of window components such as the window heading,
body, and footing, see the FRAMEVIDEO statement.
The default is FRAMEVIDEO OFF.

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_.
OFF implies TASK, RUN, and OPEN statements create low PIN processes. When
this option is off, processes are started using the Guardian procedure
NEWPROCESS.
The intrinsic #TASKPROC returns the name of the procedure that was used to
launch the process via the TASK, OPEN, or RUN statements. This intrinsic is used

HPE NonStop SeeView Manual Page 168 of 365


to interpret error codes returned by #TASKERRORTYPE and #TASKERROR. The
values returned depend on which procedure was used to launch the process. See
Guardian Procedure Calls Reference Manual for procedures
PROCESS_CREATE_ and NEWPROCESS and for information on error codes
returned.

INVERTGRAPH ON | OFF
specifies that histogram information presented by the GRAPH statement is
presented in inverted order. INVERTGRAPH ON means that the first through last
records graphed appear inverted in right-to-left order rather than the normal left-to-
right order.
The default is INVERTGRAPH OFF.

IOTRACE ON | OFF
indicates whether all terminal input and output should be traced to the file specified
with ALTER TRACEFILE filename.
ALTER IOTRACE ON causes terminal IO to be traced to this file. IOTRACE OFF is
the default. Use this option for debugging purposes only.

JOINTEXT ON | OFF
specifies that text in the adjacent window is not erased on a break or join window
operation (JOINTEXT ON). This option is useful for converting serial data into
multicolumn tabular format.
The default is JOINTEXT OFF.

JOINWIDTH line-length
specifies the join width that the window editor uses. The default width is line-
length equals zero and means that the join width is the width of the current
window.

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.

KEYSUPPRESS ON | OFF [ ,window-keys-syntax ]


temporarily suppresses the invocation of function key productions declared via the
KEYS option of the WINDOW statement. The default is ALTER KEYSUPPRESS
OFF. ALTER KEYSUPPRESS ON keeps all or selected function key script

HPE NonStop SeeView Manual Page 169 of 365


productions from executing. For a complete definition of window-keys-syntax,
see the WINDOW statement KEYS option. For example:
ALTER KEYSUPPRESS ON, BODYSILL F1,F2;
suppresses programmatic script productions associated with function keys F1 and
F2 so they function as normal SeeView function keys regardless of how the KEYS
options on any WINDOW statements were previously declared. This option is
useful for either debugging or selectively turning off undesirable script-defined
programmatic function key productions.

LOGONSTRONG ON | OFF
specifies whether hello logon authentication is performed using the VERIFYUSER
or USER_AUTHENTICATE_ system procedure call.

 If LOGONSTRONG is ON, USER_AUTHENTICATE_ is called to authenticate


the user logon and password.

 If LOGONSTRONG is OFF, VERIFYUSER is called.


VERIFYUSER supports logons only of the form group.user with limited
password checking. USER_AUTHENTICATE_ supports both logon forms
group.user and alias, as well as strong password authentication.

LOOP ON | OFF
indicates whether the shell file specified with the SHELL option is repeatedly
executed by the SeeView interpreter. LOOP ON indicates that the shell file is
repeatedly executed and implies that at the completion of each loop a delay of
SECTIONDELAY seconds occurs before the shell file is reexecuted. LOOP OFF
indicates that the shell file is not repeatedly executed.
The default is LOOP OFF.

MENUSTATUS ON | OFF
specifies whether taskids containing menu data are displayed. (For more
information, see the STATUS statement.)
The default is OFF.

MSGTRACE ON | OFF
indicates that messages pushed to the free window message cache are also
written to the file defined by the ALTER TRACEFILE option.

HPE NonStop SeeView Manual Page 170 of 365


MODEMWAIT seconds
specifies how long SeeView waits for a modem reconnection before abending
when a modem disconnect error (file-system error 140) occurs.
Specify seconds equal to 0 to indicate an indefinite wait. The default is 240
seconds.

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.

NODATATIMEOUT seconds
specifies the NODATATIMEOUT value in seconds assigned to user tasks
declared with the OPEN or
TASK statements. The default value is 60 seconds.
A NODATATIMEOUT occurs when the time for the first message received from a
process exceeds the specified number of seconds. The NODATATIMEOUT option
enables you to specify how long you are willing to wait before any response is
received from a user task after a request for output from that task.
Use the NODATATIMEOUT option to limit the amount of time the SeeView
program and the SeeView interpreter wait for operations such as
WRITE, READ, and WINDOW to complete. This option also prevents external
deadlocks from affecting the SeeView program.

PRIORITY priority
specifies the execution priority of the SeeView process.
The integer value specified by ALTER PRIORITY priority causes the SeeView
program to alter its own execution priority to be equal to the value specified. Users
tasks declared with a
TASK or OPEN statement have a process priority of one less than the current
execution priority of the SeeView process (unless a $CMON process specifies a
different execution priority). For additional information regarding user task
priorities, see the TASK statement.

HPE NonStop SeeView Manual Page 171 of 365


PRIVATE ON | OFF
specifies whether a logon to the SeeView program (from a logged-off state)
performed using the HELLO statement is restricted to the person who was most
recently logged on. PRIVATE ON means access is restricted and is the default.
PRIVATE OFF means that the logon to the SeeView program is open to any valid
user ID. For more information, see the HELLO and GOODBYE statements.

PROCTRACE ON | OFF
specifies whether a line-25 message is displayed each time a procedure is
executed.
ON indicates that each time the SeeView interpreter executes a procedure, that
procedure name is displayed on line 25. The default is OFF.

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.
Typically, the only time you need to specify QUEUE ON is to assert programmatic
synchronization in a script that preforms complex interleaving of
WRITE and READ statements between multiple processes. Communication
synchronization in a script for a single process is ensured unless WRITE and
READ statements are interleaved with one or more
WAIT statements.

RECVTRACE ON | OFF
indicates whether all $RECEIVE reads and replies should be traced to the file
specified with ALTER TRACEFILE filename.
ALTER RECVTRACE ON causes this message traffic to be traced to the trace file.
RECVTRACE OFF is the default. Use this option for debugging purposes only.

REFRESH seconds
specifies the interval in seconds for windows to be automatically updated
(refreshed) with messages received in the user-task message cache.

HPE NonStop SeeView Manual Page 172 of 365


The default interval is two seconds. Every two seconds, visible windows on the
current page are updated with any messages received.
The standard SeeShell alters the REFRESH value to one second. If another shell
is used and the REFRESH value is not specified, it defaults to two seconds.
Special considerations in connection with this option:

 The REFRESH algorithm adapts to both terminal user function key operations
and external user-task events. Making the algorithm adaptive minimizes read
cancellation and making the terminal appear fairly full duplex. The algorithm
also eliminates redundant checking of the user cache when it is not changing
and saves CPU cycles.

 Top-down user-controlled paging of window text is the default for all windows.
Normally, window text is not automatically paged or scrolled ahead. This can
be specified with the WINDOW CACHE EOFSEEK or EOFONLY options.

 The REFRESH operation occurs in a single input-output operation. Boxcarring


of user-task messages is thus achieved, which minimizes I/O operations.
Boxcarring refers to the technique of blocking an entire group of logical
operations into a single block or boxcar and sending that entire block of
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. This process ensures that what you see reflects the
current state of the message cache and eliminates a subsequent update a few
seconds later. If this piggyback operation is not performed, the adaptive
refresh algorithm determines that the screen data is out of sync with the
message cache and that the program has to do another update a few seconds
later.

 Setting REFRESH to zero disables the REFRESH option completely.


RETAIN ON | OFF
specifies whether the first declaration of a ?SECTION is to delete all existing user
string and integer variables.
ALTER RETAIN OFF causes the deletion of the existing user string and integer
variables and is the default.
If you are using the INVOKE filename statement in menu productions, set
ALTER RETAIN ON to retain variables across multiple script invocations.

HPE NonStop SeeView Manual Page 173 of 365


The standard SeeShell sets the ALTER RETAIN option to ON.

SECTIONDELAY seconds
specifies the number of seconds that the SeeView program waits between
sections when executing the current shell. During this pause, the section name just
executed appears on line 25 of the terminal. Once the delay is completed, the next
sequential section in the shell file is executed.
The default is SECTIONDELAY 1, but the standard SeeShell sets
SECTIONDELAY to 0.

SECTIONMSG ON | OFF
specifies whether a timer countdown message is displayed while the SeeView
program is waiting for the time interval defined by SECTIONDELAY seconds to
process the next sequential section in the shell file.
The default is OFF.

SETMODE110 ON | OFF
causes an immediate SETMODE 110 ON|OFF operation. Setting SETMODE110
permits the logical editing of alternate character data.
OFF indicates that alternate characters are delimited with shift-out and shift-in
ASCII control characters. SETMODE110 ON indicates that alternate characters
are delimited with the high-order bit of each character byte set on.
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. SILLSCROLL ON allows these
keys to provide scrolling through the command history for a taskid.
SILLSCROLL OFF specifies that F3 and F4 perform window text scrolling.
Because window text scrolling is possible on most keyboards with the Roll-
Up/Down keys on the right-hand side of the keyboard, using F3 and F4 to scroll
text is redundant.
The default depends on the terminal type. For additional information, see the
HISTORY statement.

HPE NonStop SeeView Manual Page 174 of 365


STATISTICS ON | OFF
specifies whether response time and CPU statistics collection are enabled. In the
STATISTICS ON state, each time you press a function key, the function key,
response time, and CPU seconds consumed by the SeeView program appears in
the free window cache. Therefore, you can view these statistics from any free
window.
Traces are annotated with elapsed-time and CPU statistics to allow in-depth
analysis of script performance. This trace adds about 70% overhead to the
execution pathlength, so use it only for diagnostic or analysis purposes rather than
as an indicator of actual process time consumption.
This option is intended mainly for script and SeeView performance analysis. The
default is OFF.

STMTTRACE ON | OFF
specifies whether statement tracing is performed. In the STMTTRACE ON state,
each time a statement is executed, that line of source code appears in the free
window cache.
Traces are annotated with elapsed-time and CPU statistics to allow in-depth
analysis of script performance.
This option is used mainly for program debugging purposes. The default is OFF.

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.

WORDTAB ON | OFF
specifies whether the tab backward and forward function keys (F15 and F16)
operate on a column basis, enabled by selecting WORDTAB OFF, or on a wordtab
basis, by selecting WORDTAB ON.
Tab backward or forward is always a column tab when the cursor is on a window
sill.
The default is ON.

HPE NonStop SeeView Manual Page 175 of 365


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. Consider:
IF condition THEN statement
It also means:
IF condition THEN compound-statement

Considerations
You can use nested compound statements.

Example
This example displays nested compound statements:

VAR width:=20, height:= 12;


TASK edit STARTUP "MYFILE;LIST ALL"
PAGE 1; CLEAR;
FOR 2 DO BEGIN {Build eight Editor windows on page 1
FOR 4 DO BEGIN
WINDOW edit SIZE width,height;
RIGHT:width;
END;
DOWN:height; {Note last move wraps around screen
END;

BELL
The BELL statement sounds the audible alarm on the terminal device associated with
the SeeView program.

BELL

Example
This example demonstrates how to use the BELL statement:

HPE NonStop SeeView Manual Page 176 of 365


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. This statement provides a convenient
way of specifying the screen buffer address that is just below the last menu, rather
than having to calculate that address.

BELOW

Considerations
The BELOW statement has the same meaning as:
LINE #MenuLine + #MenuHeight, #MenuCol;

Example
This example demonstrates how to implement the BELOW statement:

?MENU Devtypes
Devices <== BELOW; WINDOW [] MENU CACHE/Disc/ UNTIL /*/
Disc <== CALL Listdev(#menutext)
Printer <== CALL Listdev(#menutext)
Tape <== CALL Listdev(#menutext)
*
?SECT SectExample
WINDOW Devtypes MENU CACHE/Devices/ FOR 1 SIZE 13 HEAD "System";

This example provides the following output:

HPE NonStop SeeView Manual Page 177 of 365


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.

BESIDE

Considerations
The BESIDE statement has the same meaning as:
LINE #MenuLine, #MenuCol + #MenuWidth;

Example
This example demonstrates how to implement the BESIDE statement:

?MENU Devtypes
Devices <== BESIDE; WINDOW [] MENU CACHE/Disc/ UNTIL /*/
Disc <== CALL Listdev(#menutext)
Printer <== CALL Listdev(#menutext)
Tape <== CALL Listdev(#menutext)
*
?SECT SectExample
WINDOW Devtypes MENU CACHE/Devices/ FOR 1 SIZE 13 HEAD "System";

This example provides the following output:

BREAK
The BREAK statement sends a break message to the specified process. Use the
BREAK statement to send a system break message to the specified user taskid. The
user task specified must be a process that the SeeView program has opened. (It
cannot be just any process.) Use a taskid expression, process name, or CPU and
process identification number to indicate which process is to receive the break
message.

BREAK [ taskid-exp ]
[ \ node . [ $ process-name ] ]

HPE NonStop SeeView Manual Page 178 of 365


[ \ node . [ cpu,pin ] ]

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.

Considerations
If you enter the BREAK statement from a window without specifying a process, the
process currently associated with the window receives a BREAK message.
Some processes (TACL, for example) require that the device type of the SeeView
process be a terminal in order to receive a break message. You can specify this device
type with the DEVTYPE option for the
TASK and OPEN statements.

Example
This example demonstrates how to use the various options of the BREAK statements:

BREAK TACL { send a break message to a taskid named TACL


BREAK \newyork.3,88 { send break to pin 88, CPU 3, in \newyork
BRK shift-return { send break to task associated with
window

CALL
The CALL statement executes a specified SeeView procedure. CALL statements can
be executed from menu productions, procedures, sills, or sections. The procedure-
name is executed, and optional string or integer parameters can be passed to the
called procedure.

CALL procedure-name [ ( parm [, parm...] ) ]

HPE NonStop SeeView Manual Page 179 of 365


procedure-name
specifies any SeeView procedure declared with the SeeView ?PROCEDURE
interpreter directive.

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.

Example
This example shows the CALL statement:

?MENU Devs
Devices <== BELOW; WINDOW [] MENU CACHE/Disc/ UNTIL /*/
Disc <== CALL Listdev(#menutext)
Tape <== CALL Listdev(#menutext)
Printer <== CALL Listdev(#menutext)
*
?PROC Listdev ( #DeviceType ) { Declare proc "Listdev"
PARM #DeviceType; { #DeviceType is callers parameter.
TASK pup; { Declare PUP process taskid.
BESIDE; { Position beside invoked menu.
WINDOW pup, "listdev " & #DeviceType; { Window on Pup output from Listdev.

?SECT SectExample
WINDOW Devs MENU CACHE/Devices/ HEAD "" FOR 1 SIZE 13;

This example produces the following output:

vst9-178.vsd

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.

HPE NonStop SeeView Manual Page 180 of 365


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. When a
fully qualified shell file name is specified, the CI statement also defines the default
volume and subvolume of disk files accessed by SeeView. You can also use the
ALTER statement to individually alter file settings. Attributes affected by the CI
statement are SHELL, DICTIONARY, SAVEFILE, and the default VOLUME.

section-name
specifies that only a particular section in the shell-filename is invoked when
the shell is invoked. See also ALTER SHELL option.

Considerations
When SeeView runs in CI mode, scripts containing PROMPT statements allow
SeeView to behave as a command interpreter.
When the CI statement appears as the first statement in the startup message of a
TACL SeeView run statement, SeeView is run in SERVERMODE 3.

Examples
These examples show how to use the CI statement:
TACL 1 > RUN SeeView CI
TACL 2 > RUN SeeView CI $Data.subvol.MyScript

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.
If you use the CLEAR statement to clear the contents of a window and the data in the
window is also in the cache, the data still remains in the cache.

HPE NonStop SeeView Manual Page 181 of 365


CLEARW
The CLEARW statement deletes windows on the current page but only in the area
defined. If a window is in edit mode in the area defined, an error message appears. If
no windows are on the page, nothing is cleared. If the area is not specified, the current
buffer address is used.

CLEARW [ line [, column [, width [, height ] ] ] ]

line
specifies an area to be cleared, in the range 1 through 24.

column
specifies an area to be cleared, in the range 1 through 80.

width
specifies an area to be cleared, in the range 1 through 80.

height
specifies an area to be cleared, in the range 1 through 24.

Example
This example shows the CLEARW statement displaying various options:

CLEARW { delete all windows on entire page


CLEARW 13; { delete all windows in lower half of screen
CLEARW 1,1,40,12; { delete all windows in upper left quadrant of screen

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.

HPE NonStop SeeView Manual Page 182 of 365


column-exp
specifies the horizontal column location. Absolute column numbers range from 1
through 80, left to right. If you do not specify column-exp, column 1 is assumed.

Example
This example shows the CURSOR statement displaying various options:

CURSOR 1; { Position cursor on line one, column one.


CURSOR 24,80; { Position cursor on line 24, column 80.

DECLARE
The DECLARE statement declares string and integer variables. The DECLARE
statement and the VARIABLE statement are equivalent.

DECLARE variable [:= initialization-exp ] [, variable ...]

variable
specifies the symbolic variable name of a string or integer variable. If you prefix
variable with a pound sign (#), it represents a string variable. Otherwise, it
represents an integer variable. String variables can contain up to 132 characters
and have an implicit length associated with them. Integer variables represent 16-bit
signed integers.
A variable name can be any combination of alphanumeric characters up to 16
characters in length. Variables can be initialized when declared and can reference
intrinsics or other previously declared variables.
The scope of string and integer variables is global when declared in a ?SECTION
and local when declared in a ?PROCEDURE.

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.
String variables declared with no initialization-exp have an initial value
equal to the null string "". Integer variables declared with no initialization-
exp have an initial value equal to minus one (-1).

HPE NonStop SeeView Manual Page 183 of 365


Example
This example demonstrates how to use the DECLARE statement options:

DEC width := 80,


cols := width/10 + 1,
#names := "CHICAGO NEWYORK SANFRAN LA",
#morenames := #names & " MEMPHIS DALLAS STLOUIS";

DELAY
The DELAY statement causes the terminal to delay the processing of its command
string for a specified number of seconds.

DELAY seconds

seconds
specifies the delay time in seconds.

Note. The DELAY statement delays only the terminal and not the SeeView program
itself.

Considerations
The
WAIT statement is preferable to the DELAY statement in all cases except special
terminal testing.

Example
This example demonstrates how to use the DELAY statement:

VAR pg:=0;
WHILE (pg:=pg+1) < 7 DO BEGIN {For pages 1->6:
PAGE pg; {Display page "page"
DELAY 2; {wait 2 secs between pages
END;

DELETE
The DELETE statement deletes all lines of text contained in the cache memory
associated with the specified task.

DELETE cache-taskid !

HPE NonStop SeeView Manual Page 184 of 365


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. The DELETE statement does not change a task's operational status. If the task
was running, it will still be running.

Example
This example shows how you can use the DELETE statement to empty a cache so
that it can be used to programmatically generate a dynamic menu:

?MENU FileInfo

?PROC ShowFileInfo ( #subvol )


{----------------------------}
{ This proc displays a menu containing fileinfo
{ for the subvol contained in string variable
{ #subvol. The TASK copy option is used to
{ generate the contents of the FileInfo menu.
{--------------------------------------------}
PARM #subvol; { subvol to do fileinfo on

TASK fup;
WRITE fup,"info " & #subvol & ".*";
FOR 2 DO READ fup;{ skip over heading
DELETE FileInfo !;{ empty FileInfo cache
TASK fup COPY FileInfo;
LINE 4;
WINDOW FileInfo { Display FileInfo Menu
MENU
"CALL ShowInfoDetail(#TAKE #MENUTEXT)"
CACHE SIZE 13,24;

?PROC ShowInfoDetail ( #file )


{----------------------------}
{ Do an INFO file,DETAIL on the
{ file pointed to in the FileInfo menu.
{--------------------------------------}
PARM #file;
TASK fup;
BESIDE;
WINDOW fup,"INFO " & #file & ",DETAIL";

HPE NonStop SeeView Manual Page 185 of 365


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 run-
time syntax error appears.

DISPLAY { CLEAR | str-exp-list | FROM taskid [CACHE index] }

FIELDINDEX | FIELD start-field-index-in-window


FOR number-of-fields

ALLFIELDS | ALL
FREEONLY | FREE
PROTECTONLY | PROTECT

VIDEOTEMP video-and-field-attributes

CLEAR
clears the indicated fields to spaces. For example:
DISPLAY CLEAR FIELD 0 FOR 3
clears the first three unprotected, or free, fields in the window.
DISPLAY CLEAR [FREE]; Clears all unprotected fields in the window
DISPLAY CLEAR ALL; Clears unprotected and protected fields
DISPLAY CLEAR PROTECT; Clears only protected fields in the window

str-exp-list
displays a comma-separated list of string expressions in the fields associated with
the window located at the current buffer address. Each string expression is
automatically mapped to the corresponding window field on a left-to-right, top-to-
bottom basis. For example:

DISPLAY "John", "Smith", "500 West Main", "Chicago", "IL"


would be mapped as follows:
First[John]Last[Smith]
Street[500 West Main]
City[Chicago]State[IL]

Use the FIELD, FOR, FREE, PROTECT, and ALL options to control which fields
are updated.

HPE NonStop SeeView Manual Page 186 of 365


FROM taskid [ CACHE index ]
displays records from the cache associated with the specified taskid into the
fields associated with the window at the current buffer address.

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.
Fields are numbered starting from zero to n-1 on a left-to-right top-to-bottom
basis, where n is the number of fields of the type specified FREE, PROTECT, or
ALL.
If you do not specify FIELD, the display begins with field zero, which is the first
field. For example:

DISPLAY "Smith" FIELD 1;


First[]Last[Smith]
Street[]
City[]State[]

FOR number-of-fields
indicates the number of fields to display. If you do not specify FOR, all data
elements contained in the str-exp-list or from taskid appear. For example:

?MENU PersonData
John
Smith
500 West Main
Chicago
IL

?SECT Main
DISPLAY FROM PersonData CACHE 2 FOR 3;

First[]Last[]
Street[500 West Main]
City[Chicago]State[IL]

ALLFIELDS | ALL
indicates that both protected and unprotected (free) fields are accessed with the
DISPLAY statement. Normally, only unprotected (free) fields are accessed. When

HPE NonStop SeeView Manual Page 187 of 365


you specify ALL, all fields are accessed, and the FIELD and FOR option values
apply to both protected and unprotected fields.

FREEONLY | FREE
indicates that only unprotected, or free, fields are accessed with the DISPLAY
statement. FREE is the default. The FIELD and FOR options apply only to the
unprotected free fields.

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.
The temporary attributes are reset to the default attributes the next time the field is
referenced with the DISPLAY statement.
To restore specified field attributes to their original default values, use the
VIDEOTEMP( ) option of the DISPLAY statement.

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.
{-------------------------------------------------------}
PARM rows, cols, width:=3;
VAR row, #s, aw:=8;
DELETE matrix!;
FOR rows DO BEGIN { build rows of flds [ ][ ][ ]..
row := row+1; { 0 .. rows-1
#s := "";
FOR cols DO #s:=#s & "[" & #SPACES[ 1:width ] & "]";
#s:=#s & " =[" & #SPACES[ 1:aw ] & "]";
PUSH #s ONTO matrix;
END;
PUSH "*" ONTO matrix; { * marks end of matrix in cache
WINDOW matrix MENU "CALL Op(" & rows &","& cols & ")"
KEYS F5,F6,F7,F8
HEAD "Init-f5 Del-f6 Add-f7 Copy-f8"

HPE NonStop SeeView Manual Page 188 of 365


CACHE FIRST UNTIL/*/ FIELDS(U) NOFRAME
SIZE (cols*(width+2)+4+aw);

?PROC Op ( rows, cols )


{---------------------}
{ Based on the function key perform operation.
{---------------------------------------------}
PARM rows, cols;
LINE #MENULINE,#MENUCOL;

IF #FKEY=5 THEN CALL init(rows,cols);


IF #FKEY=6 THEN DISPLAY CLEAR;
IF #FKEY=7 THEN CALL accept(rows,cols);
IF #FKEY=8 THEN CALL copy;

?PROC init;
{---------}
{ initialize matrix to values from 0 .. (rows*cols-1)
{---------------------------------------------------}
PARM rows, cols;
VAR i,v; { note i, v initially = -1
FOR rows DO BEGIN
FOR cols DO BEGIN { value "v" into field i
DISPLAY (v:=v+1) FIELD (i:=i+1) FOR 1;
END;
DISPLAY CLEAR FIELD (i:=i+1) FOR 1; { clr last fld
END;
?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.
{------------------------------------------------------------}
PARM rows, cols;
VAR #s,sum,row;
DELETE data!; { clear out old data
ACCEPT INTO data FIELDPERLINE; { accept numbers from screen
FOR rows DO BEGIN { sum them up for each row
row := row+1;
sum := 0;
FOR cols DO BEGIN
POP #s FROM data;
IF #NUMERIC #s THEN sum := sum+#s;
END;
DISPLAY (sum) FIELD (row)*(cols+1)+cols VIDEO(R);
POP #s FROM data;
END;
?PROC copy
{---------}
{ This proc copies data in window to MyFile.
{------------------------------------------}
DELETE data!;
ACCEPT INTO data PROTECTED; { accept all fields from window
SAVE MyFile!, data; { MyFile contents are below.

?SECT main
{---------}
{ 0 1 2 3 4 5 6 = 21
{ 7 8 9 10 11 12 13 = 70
{ 14 15 16 17 18 19 20 = 119
{ 21 22 23 24 25 26 27 = 168

HPE NonStop SeeView Manual Page 189 of 365


{ 28 29 30 31 32 33 34 = 217
{ 35 36 37 38 39 40 41 = 266
{ 42 43 44 45 46 47 48 = 315
{ 49 50 51 52 53 54 55 = 364
{-----------------------------------------}

CALL ShowMatrix( 8, 7 );

This output is from the previous program after function keys F5-Init and F7-Add are
pressed:

vst9-188.vsd

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.

UNTIL expression
specifies the expression that is to be evaluated after each iteration to determine
whether another iteration is to be performed: Reiterate statement if
expression is zero. Stop looping if expression is nonzero.

Example
This example shows a DO statement that iterates a compound statement:

?MENU systems

?PROC ShowNodes
{--------------}
{ This proc loads the "systems" menu
{ with network node numbers and names.
{------------------------------------}
VAR #s, #sysno;
TASK netmon;

HPE NonStop SeeView Manual Page 190 of 365


WRITE netmon,"CPUS";

DELETE systems!;{ Cleanup systems menu


WITH netmon; { To use #taskprompting

DO BEGIN { Read until prompting


READ netmon,#s;
#sysno := #TAKE #s;
IF #NUMERIC #sysno THEN
BEGIN { #s contains system info
PUSH #s ONTO systems;
END;
END UNTIL #TASKPROMPTING;

WINDOW systems CACHE;

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. For example:
RIGHT:3:# DOWN:3:# LEFT:3:# UP:3:#
This example draws a box:
###
# #
###
See also the UP, LEFT, and RIGHT statements.

Example
This example demonstrates how to use the DOWN statement:

DOWN:i:# {Moves for the current value of variable i smearing "#".


DOWN {Moves one.
DOWN:30 {Moves 30. Note that moves wrap around the screen.

HPE NonStop SeeView Manual Page 191 of 365


END
The END statement marks the ending of a compound statement.

END

Example
This example displays how to use the END statement:

VAR rows := 24, cols:=80/4;


FOR rows DO BEGIN {Draw a herringbone
FOR cols DO BEGIN
VIDEO (REVERSE DIM) RIGHT:2 VIDEO() RIGHT:2
END;
LEFT:79; DOWN
END;

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. This enables you to use variable information contained in string and
integer variables to build SeeView statements.

Examples
1. This example of the EXECUTE statement finds a specified task and displays a
window on that task:

TASK pup;
CALL ShowTaskPage("pup");
?PROC ShowTaskPage { #taskname }
{------------------------------}

HPE NonStop SeeView Manual Page 192 of 365


{ This proc determines whether a task named #taskname exists.
{ If so, the page with a window on that task exists is displayed.
{---------------------------------------------------------------}
PARM #taskname;
IF NOT #TASK #taskname THEN return; { Check for task's existence
EXE "WITH " &#taskname; { exe "with pup" for #taskpageno
IF #taskpageno THEN PAGE #TASKPAGENO { pup has a window on it =>goto page
ELSE BELL; { pup has no window on it=>bell

2. A second use of EXECUTE is to substitute file names or integer values contained


in string or integer variables in portions of SeeView statements that do not
otherwise permit variable information.
For example, the statement LOAD myfile,mycache loads file myfile into cache
mycache. In the LOAD statement, you cannot use a string variable such as #file in
place of the file name. You can use the EXECUTE statement to solve this problem
by allowing the formation of a statement that can be executed:
EXECUTE "LOAD " & #file & ",mycache".
3. A third use of the EXECUTE statement is to provide a way to make statement
options parametric.
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. Then when a keyword is encountered, the
rule can be looked up and executed.
For example, the following menu associates rules with keywords. The procedure
Perform then performs the rule associated with each keyword contained in a list of
keywords.

?MENU rules
{--------}
ADD= CALL AddRecord ("fup")
DELETE= CALL DownDevice("pup")
UPDATE= CALL UpdateRec ("sqlci")

?PROC Perform (#KeyWords,rules)


{-------------------------}
PARM #KeyWords; { list of keywords to perform
PARM rules; { cache to search for rules

VAR #KeyWord := #TRIM #KeyWords


,#rule
, i
;

HPE NonStop SeeView Manual Page 193 of 365


WHILE #KeyWord <> "" DO BEGIN { While keyword.
SEARCH rules { Search rules cache
CACHE #KeyWord &"=" { for keyword=
LINEFOUND #rule -> i; { #rule if found.
IF (i>=0) THEN BEGIN { Rule found
SCAN #rule UNTIL "=" -> i; { Scan for "="
EXECUTE #rule[i+1:132]; { EXE text past "="
END;
#KeyWord := #TRIM #KeyWords; { Get next word
END;

?SECT main
{---------}

CALL Perform( "ADD ADD ADD DELETE", rules);

FLUSH
The FLUSH statement forces compiled screen data to be displayed immediately.
Screen output data is normally buffered until the end of compilation or is automatically
flushed if the buffer is full. By causing immediate display of data, the FLUSH statement
provides a means of controlling when buffer output occurs.

FLUSH

Example
This example shows how to use the FLUSH statement.

VAR #pages := #PAGESUSED; { #pages is list of pages, e.g. "1 2 3 4"


WHILE #pages<>"" DO BEGIN { While there are #pages left.
PAGE #TRIM #pages; { Show each page.
FLUSH; { Cause page switch I/O to occur.
WAIT 1, refresh; { Wait 1 second.
END;

FOR
The FOR statement performs iteration on a statement.

FOR expression DO statement

expression
specifies any expression that yields an integer value. The expression indicates
the number of times statement is to be iterated. The expression is evaluated
only once to determine the number of iterations to perform, and it must be greater
than or equal to one.

HPE NonStop SeeView Manual Page 194 of 365


DO statement
specifies a single statement or a compound statement delimited with BEGIN and
END terms. The statement following DO is executed expression times.

Considerations
You can use nested FOR statements.

Examples
The DrawWindowsOn procedure uses nested FOR statements to draw windows on a
list of task names contained in the parameter string named #tasklist.

?PROC DrawWindowsOn(#tasklist, rows, cols)


{----------------------------------------}
{ This proc displays rows*cols windows on task
{ names contained in parameter string #tasklist.
{----------------------------------------------}
PARM #tasklist { tasks to draw windows on
, rows:=3 { default number of rows
, cols:=3 { default number of cols
;
VAR #list := #tasklist
,#tid { task variable name
, w := 80/cols { window width
, h := 24/rows { window height
, row := -1 { current logical row
;
FOR rows DO BEGIN { For each row
LINE (row:=row+1)*h+1; { position to line.
FOR cols DO BEGIN { For each column
#tid:=#TRIM #list; { get next taskid
IF NOT #TASK #tid THEN
BEGIN { no task, create it
EXECUTE "TASK " & #tid;
END;
EXECUTE "WITH " & #tid;{ get "WITH taskid"
WINDOW #taskid CACHE LASTPAGE
SIZE w,h
EOFONLY NOCURSOR NOFRAME;
RIGHT:w; { move to next column
IF #list="" THEN #list:= #tasklist;
END;
END;

?SECT main
{---------}
TASK ci:=comint; { if not declared, proc declares

CALL
DrawWindowsOn("tacl ci pup cup scf cmi",3,2);

HPE NonStop SeeView Manual Page 195 of 365


This procedure uses a FOR statement to iterate through a cache, changing all
occurrences of #target to #newtext.

?PROC ChangeCache(Cacheid,#target,#newtext)
{-----------------------------------------}
PARM Cacheid { taskid of cache to scan
,#target { target text to change
,#newtext { text to replace target
;
VAR #s { scratch string var
,#before { text before target
,#after { text after target
, i { scratch integer var
, r { record no in cache
;
WITH Cacheid; { to use #taskcachelines
IF NOT #TASKCACHELINES THEN
RETURN; { nothing to scan for

FOR #TASKCACHELINES DO
BEGIN { read each line in cache
READ Cacheid CACHE (r:=r+1),#s;
SCAN #s UNTIL { search for target
#target->i;
IF i THEN { target found
BEGIN { figure text before/after
#before:="";{ text in #s before target
#after :="";{ text in #s after target
IF i>1 THEN { there is text before
#before:=#s[1:i-1];
IF (i+#SIZE #target) < (#SIZE #s) THEN
#after := #s[i+#SIZE #target:132];
#s:= #before & #newtext & #after;
{ #s updated, now update record in cache
WRITE Cacheid CACHE r UPDATE,#s;
END;
END;

Note. The preceding example is for demonstration purposes only to illustrate use of
nested FOR statements. This example performs a case-sensitive scan for the #target.
The
SEARCH statement example shows a more efficient non-case-sensitive change
mechanism.

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.

HPE NonStop SeeView Manual Page 196 of 365


FRAMEVIDEO | FV [ HEAD ] video
[ BODY ]
[ FOOT ]
[ FOOTNOSILL ]

[ MENUHEAD ]
[ MENUBODY ]
[ MENUFOOT ]

[ EDITHEAD ]
[ EDITBODY ]

HEAD
specifies the video attributes for window headings. This portion of the window is
referred to as HEADING in the WINDOW statement.

video
specifies any of the video attribute syntax defined in the
VIDEO statement. Thus video can be either video attribute keywords
enclosed in parentheses such as (Reverse, Blink, Dim, Underline), or video
attribute numeric values enclosed in square brackets such as [4+1+16] which
is equivalent to the keywords from (Reverse Dim Underline).

BODY
specifies the video attributes for window bodies. The body is the portion of the
window referred to as the GLASS area of the window in the WINDOW statement.

FOOT
specifies the video attributes for window footings that have a sill. This portion of the
window is referred to as the SILL in the WINDOW statement.

FOOTNOSILL
specifies the video attributes for window footings that have no sill. This portion of
the window is referred to as the SILL in the WINDOW statement.

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.

HPE NonStop SeeView Manual Page 197 of 365


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.
This portion of a window is referred to as the SILL area of a window in the
WINDOW statement.

EDITHEAD
specifies the video attributes for window headings associated with edit-mode
windows. This portion of the window is referred to as the HEADING in the
WINDOW statement.

EDITBODY
specifies the video attributes for window bodies that are associated with edit-mode
windows. This portion of a window is referred to as the GLASS area of a window in
the WINDOW statement. When a window goes from normal mode to edit mode,
the video attributes of the window body automatically change from BODY video
to EDITBODY video.

Example
This FRAMEVIDEO statement displays window headings in reverse video, the window
body in normal video, and window footings in reverse underline video:
FV HEAD(R) BODY() FOOT(R U).
This example shows how to use the FRAMEVIDEO statement.

FRAMEVIDEO HEAD(R) BODY(R D) FOOT(R D) EDITHEAD(R) EDITBODY()


FRAMEVIDEO MENUHEAD(R) MENUBODY() MENUFOOT()

The following program:

 Calls the SeeShell procedure SEECOLOR to set the colors for PCT
 Defines FRAMEVIDEO attributes for video frames and sets FRAMEVIDEO ON
 Initiates recovery so the SeeView program repaints all windows and menus
Example 9-1. Sample SeeView Program

CALL seecolor;

HPE NonStop SeeView Manual Page 198 of 365


ALTER FRAMEVIDEO ON;
FV HEAD ( Reverse );
FV BODY ( Reverse Dim );
FV FOOT ( Reverse Dim );
FV FOOTNOSILL ( );
FV MENUHEAD ( Reverse Dim );
FV MENUBODY ( Dim );
FV MENUFOOT ( );
FV EDITHEAD ( Reverse );
FV EDITBODY ( Reverse Dim Blink );
ESC "dm"; { emulate function key SF14

GOODBYE
The GOODBYE statement logs you off from the SeeView program. All function key
operations are disallowed in the logoff state except the Return key, which you use to
log on. (For more information on logging on, see the HELLO statement.)
When you are logged off, the SeeView program continues to maintain user context,
communicate with user tasks, process user task messages, and cache the user task
messages in a normal manner.
The GOODBYE statement does not execute if any conditions exist that would prevent
you from logging back on, such as:

 The absence of windows on the current page


 The absence of accessible windows on the current page (For example, the
windows are too small or have no sill and contain glass.)

 The existence of windows in edit mode (unless ! is specified)


GOODBYE [!]

!
indicates that you want to log off regardless of whether any windows are in edit
mode. Specifying the exclamation mark indicates that you do not care about
saving changes made to edit-mode windows.

Considerations and Examples

 You can follow a GOODBYE statement with other SeeView statements, with the
exception of CLEAR, CLEARW, PAGE, and SETPAGE. These statements cause
a run-time error if executed when the SeeView program is in a logged-off state.
This example executes properly:

HPE NonStop SeeView Manual Page 199 of 365


PAGE 2; CLEAR; WINDOW; GOODBYE;
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. Thus,
the command GOODBYE; RUN COMINT allows you not only to safely secure your
SeeView environment (and all tasks running under it) but also to optionally give up
the terminal for general command interpreter use (for example, COMINT or TACL).
Exiting the command interpreter returns control to the SeeView program, which
you can then log on to with the HELLO statement.

 The configured value of the ALTER PRIVATE [ ON | OFF ] option at logoff time
controls whether SeeView logon access is restricted to a specific user ID
(PRIVATE ON, which is the default) or whether access is open to any user with a
valid user ID (PRIVATE OFF). If you set ALTER PRIVATE ON, logon by the super
ID is permitted. For logon considerations, see the HELLO statement.

 You can use the ALTER AUTOLOGOFF option to automatically log off after a
specified period of operator inactivity. See the ALTER AUTOLOGOFF option.

GRAPH
The GRAPH statement draws a histogram of the specified numeric data. The FILE,
TASK, or RECORD option accesses various data sources.

GRAPH FILE { filename | TASK taskid | [RECORD record.field ]}


[options ]
where options ::= [ ALPHA ]
[ AT Xexp , Yexp ]
[ CACHE index ]
[ FOOT string-exp ]
[ GRID interval-exp ]
[ HEADING string-exp ]
[ HISTO number ]
[ HISTOALT 6-altchars ]
[ INVERT ]
[ KEY [APPROX] "[" expression | string "]"]
[ MASK mask-syntax ]
[ OVERLAY ]
[ RIGHT | DOWN | SAME ]

HPE NonStop SeeView Manual Page 200 of 365


[ RULE OFF | RIGHT ]
[ SCALE { min | MIN}, { max | MAX} ]
[ SIZE { Wexp | MAX}, { Hexp | MAX} ]

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 count := 50;


TASK enform;
WRITE enform, "Open employee; set @heading off;";
WRITE enform, "Set @target-records " & count & ";";
WRITE enform, "List employee.salary;";
GRAPH TASK enform HEAD "Salaries of first 50 employees";

RECORD record.field
indicates that the data to be plotted is specified by the data definition contained in
the DDL-generated data dictionary in the current default subvolume.
record.field specifies a DDL-defined record.field, such as
YEARLY.REVENUES. You do not have to say GRAPH RECORD
YEARLY.REVENUES but GRAPH YEARLY.REVENUES instead. (The parser
recognizes that you are referring to a record.field without the keyword
RECORD.)
If the RECORD specification appears, without TASK or FILE, the data represented
by record.field is from the file identified by the DDL record description.
If the RECORD specification appears with a TASK or FILE specification, the data
comes from the TASK or FILE, but the field data type and offset information
contained in the DDL data dictionary is used to interpret the records from the
indicated TASK or FILE.
You can also subscript a field name with an index (for example, x.y.z[ i ]) even
when the field is not declared with a DDL occurs clause.
When you issue a GRAPH TASK taskid or GRAPH FILE filename statement
without an additional RECORD specification, the format of each record or
message is assumed to be free-form ASCII numeric, and the first number in each
record is graphed.

HPE NonStop SeeView Manual Page 201 of 365


ALPHA
indicates that the graph should be drawn without using alternate character
graphics.

AT Xexp , Yexp
indicates where on the page to plot the graph. You can use other SeeView
statements, such as LINE, to provide positioning.

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.

FOOT string-exp
defines additional optional text at the base of the graph. This option is frequently
used to place additional information at the base of a graph. The number of
characters in string-exp should not exceed the width of the graph.

GRID interval-exp
indicates the grid pattern interval in terms of the number of vertical character
positions.
The default is GRID 1, which specifies a grid for every line. GRID 0 suppresses the
grid altogether. GRID 3 specifies a grid on every third vertical increment. These
examples illustrate GRAPH statements entered from free windows.

HPE NonStop SeeView Manual Page 202 of 365


VST904

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.

HISTOALT 6-altchars
defines the ASCII characters used to form the graphing segments. For example,
HISTOALT "123456" defines the six alternate characters used to draw graph
segments.

INVERT
causes data to appear in reverse order. Thus, the first record would appear in the
rightmost position in the graph instead of the leftmost position.

HPE NonStop SeeView Manual Page 203 of 365


KEY [ APPROX ] "[" expression | string "]"
allows generic (default) or approximate Enscribe key positioning of graph data for
key-sequenced disk files. For example, this statement performs a generic Enscribe
key position on the primary key value equal to “NODE 001 CPU 00” and graphs all
generic records that follow that position:
GRAPH cpu.busy KEY ["NODE 001 CPU 00"]
You can also specify KEY as a list of integers:
GRAPH cpu.busy KEY [1,0]

Note. The quotation marks (“) around the left and right brackets ([ and ]) indicate
that the brackets must be entered as part of the syntax. Do not confuse these
brackets in quotation marks with syntax notation brackets. Normal brackets indicate
options. These brackets are entered as part of the syntax.
MASK mask-syntax
defines histogram vector placement. A mask consists of a series of mark-and-
space format rules for displaying the vertical elements of a histogram. For
example, MASK (4M,2S) indicates that each group of four vertical histogram data
points should be spaced two columns apart.

OVERLAY
specifies that the graph is drawn with no frame or grid. Use this option to
superimpose multiple graphs in the same area.

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.

RULE OFF | RIGHT


causes the graph scale that normally appears on the left side of the histogram
either not to be drawn at all (OFF) or to appear on the right side of the histogram
(RIGHT).

SCALE { min | MIN }, { max | MAX}


specifies the numeric range of the vertical scale. MIN and MAX are the minimum
and maximum values for all elements of the graphed data. min and max are
positive integer values that can be represented in 31 bits.

HPE NonStop SeeView Manual Page 204 of 365


For example, if the range of CPU busy for CPU 1 is a minimum of 40% and a
maximum of 78%, the statement GRAPH CPU.busy SCALE MIN,MAX KEY [1]
results in a graph that has a scale minimum value of 40 and a maximum value of
78. The histogram element for 40% busy does not appear because the scale
minimum is equal to that value.
If the same data is graphed using SCALE 0,78, the histogram element for 40%
appears because the minimum is 0.

min
specifies the minimum positive integer value that can be represented in 31 bits.

MIN
specifies the minimum value for all elements of the graphed data.

max
specifies the maximum positive integer value that can be represented in 31
bits.

MAX
specifies the maximum value for all elements of the graphed data.

SIZE { Wexp | MAX}, { Hexp | MAX}


specifies the width and height of the graph area.

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. Valid values
for Hexp range from 3 through 24.

HPE NonStop SeeView Manual Page 205 of 365


Example
This example shows the GRAPH statement.

?PROC GraphCpus(sysno,#cpulist)
{-----------------------------}
{ Graph cpu busy for cpu numbers
{ contained in #cpulist for sysno
{--------------------------------}
PARM sysno { system number of CPUs in cpulist
,#cpulist { list of cpu numbers to graph
;
VAR count:=0 { number of CPUs in #cpulist
, cpuno { current cpu number
,#s { scratch string
;
#s:=#cpulist; { count number of CPUs in list
WHILE #TRIM #s<>"" DO count:=count+1;

FOR count DO BEGIN { graph each cpu in list


cpuno := #TRIM #cpulist;
GRAPH cpu.busy KEY [sysno,cpuno]
INVERT RIGHT GRID 0
SCALE 0,63
SIZE 48/count,12
HEAD "Cpu " & cpuno & " Busy";
RIGHT;
END;

?SECT main
{---------}
ALTER DICTVOL $WORK.NSSDB;

CALL GraphCpus(13,"0 1 3"); {node 13, CPUs 0 1 3

This output is from the previous example.

VST905

HELLO
The HELLO statement logs on to SeeView.

HPE NonStop SeeView Manual Page 206 of 365


If the SeeView program is currently in a logged-on state, you can log on with any valid
user ID and password.
If the SeeView program is not logged on, the ALTER PRIVATE [ ON | OFF ] statement
option determines whether access is restricted to the person who most recently logged
off (access PRIVATE ON, which is the default) or is open to anyone with a valid user
ID and password (access PRIVATE OFF).

HELLO [ group . user ] [ , password ]

group . user
specifies the accessor ID that you use to log on to SeeView.
A two-step invisible-password hello logon occurs from a window if you do not
supply the [ , password ] portion of the HELLO statement. The window is
reformatted using the WINDOW…BLANKSILL attribute. When you enter the
password and press Return, the window is restored to its original state.

password
designates the password you must use, if indicated, to log on to SeeView.
If the password includes control characters, you can use the tilde character (~) to
delimit the control character. (Pressing the CTRL key has no effect when a 6500-
series terminal is in block mode.) For example, ~NOP is equivalent to control-
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. However, by doing so,
you assume all responsibility as to whether logged-on processes should be logged off or
stopped, as well as whether the user context in cache should be deleted using DELETE
statements.

Example
This example shows the HELLO statement and how to use the tilde to delimit control
characters.

HELLO NULL.NULL,~NOP { control-NOP


HELLO NULL.NULL,~a~normal { control-A normal

HELP
The HELP statement provides online information about SeeView commands and the
SeeView program. To request help from a free window at any time, enter HELP and

HPE NonStop SeeView Manual Page 207 of 365


press Return. You can only enter help from a window. You cannot use the HELP
statement from a script.

HELP [ command ]
[ string-exp ]
[ ALL ]
[ NEW [ FEATURES ] ]
[ NEW USER ]

command
displays a detailed description of the designated SeeView statement command.

string-exp
refers to any string operator or intrinsic as defined in

HPE NonStop SeeView Manual Page 208 of 365


String Operators and String Intrinsics.

ALL
lists all of the SeeView statement commands and function keys. It has the same
function as pressing F14.

vst906

NEW [ FEATURES ]
provides a summary of new features since the revision date.
All new features appear in the HELP NEW FEATURES display.

vst907

HPE NonStop SeeView Manual Page 209 of 365


NEW USER
displays generalized, introductory help for new users when you type HELP NEW
USER from a window sill. For example:

vst908

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. Shifted function keys SF3 and SF4 display the first and last
command in the history cache. This feature eliminates the need for a fix command.
To configure the size of the history cache at run time, use a TACL PARAM statement:
PARAM HISTORYPAGES history-pages. The default size is three pages (room for
about 150 average commands). All command history shares a common cache to
ensure a correct sequential audit of the command history.

HISTORY [ * | taskid ] [ , COUNT cmds ]


[ , DETAIL ]
[ , INVERT ]

*
displays the history for all tasks associated with the SeeView process.

HPE NonStop SeeView Manual Page 210 of 365


taskid
displays the history for all tasks associated with the particular taskid.
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.

INVERT
displays commands in newest to oldest order rather than the default order of
oldest to newest.

Example
This example demonstrates the use of the HISTORY statement with the DETAIL
option.

HISTORY *, DETAIL

Date Time Task Command


----- ----- -------- -------------------------------------
05/03 15:27 * GOODBYE
05/06 11:31 * HELLO
05/06 11:31 PSMAIL index inbox
05/06 11:32 PSMAIL delete 002
05/06 11:32 PSMAIL delete 005
05/06 11:35 PSMAIL read 003
05/06 11:36 PSMAIL reply
05/06 11:37 FILEINFO i $SYSTEM.SYSTEM.XR*
05/06 11:37 FUP copy $SYSTEM.SYSTEM.XRLSTOOL
05/06 11:37 TACL2 who
05/06 11:38 TACL2 fup info xrlstool
05/06 11:38 TACL2 fup give xrlstool,255,0
05/06 11:42 SEEDIT1 volume $data.scratch
05/06 11:42 SEEDIT1 get memo!
05/06 12:13 SEEDIT1 save
05/06 12:16 * GOODBYE

Task * implies history is for a SeeView command.

HPE NonStop SeeView Manual Page 211 of 365


IF
The IF statement provides conditional execution of other statements.

IF expression THEN statement [ ELSE statement ];

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.

 You can place semicolons to control the scope of compound statements as in
other block-structured languages such as PASCAL or TAL.

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.
{----------------------------------------------}
PARM #DevType; { Type of device, "" => all
VAR #line { Line of text from pup
, DownCol { Column of "D" down STATE info
, i { Scratch variable
;
DELETE DownDevs!; { clean out menu
TASK pup:=pup; { declare pup, start listdev
WRITE pup,"listdev " & #DevType;
WITH pup; { WITH pup for #taskprompting

DO BEGIN { find "STATE" column range


READ pup,#line;
SCAN #line UNTIL "STATE" -> DownCol;
IF #TASKPROMPTING THEN RETURN;

HPE NonStop SeeView Manual Page 212 of 365


END UNTIL (DownCol > 0);

WHILE NOT #TASKPROMPTING


DO BEGIN { For each device check STATE
READ pup,#line;
SCAN #line UNTIL "$" -> i;
IF i THEN BEGIN { Have a device in #line
IF #TAKE #line[ DownCol:DownCol+4 ] = "D"
THEN BEGIN { Device down, push onto menu
PUSH #line ONTO DownDevs;
END;
END;
END;
WITH DownDevs; { Advise if none down
IF #TASKCACHELINES=0 THEN BEGIN
MSG(r) "No " & #DevType & " devices are down.";
RETURN;
END;

WINDOW DownDevs { Display menu


MENU "CALL UpDev(#MENUTEXT)"
FOR #TASKCACHELINES SIZE 17;

?PROC UpDev(#devinfo)
{-------------------}
PARM #devinfo;
BESIDE;
WINDOW pup,"listdev " & #devinfo[6:15];

{ Add desired logic ...

?SECT main
{---------}
PAGE 2; CW;

CALL ShowDown;

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. The information includes:

 The name of the file or cache that contains the procedure

HPE NonStop SeeView Manual Page 213 of 365


 The procedure name
 The address of the procedure in the file or cache
 The number of times the procedure has been called
procname
names a specific procedure for which the SeeView program is to display
information.

QFILES
displays a list of file and cache names that contain procedures currently known to
the program.

Examples
This example shows the INFO QFILES option.

INFO QFILES

PROCS in CACHE SHELL = 43


PROCS in CACHE SEECSTM = 3
PROCS in CACHE SEELOCL = 11
PROCS in $DATA.SEEX.EDITLIB = 8
PROCS in $DATA.SEEX.SEEMEAS = 17
--> total procs = 82, longest chain = 3 <--

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.SYSTEM.SEELOCL was first invoked.

HPE NonStop SeeView Manual Page 214 of 365


INVOKE
The INVOKE statement executes all sections in the specified file or cache.

INVOKE [ FILE ] edit-filename


CACHE taskid

FILE edit-filename
specifies the name of the file to be invoked or executed.

CACHE taskid
designates the taskid of the cache that is to be invoked or executed.

Considerations
All procedures contained in the invoked file or cache are added to the SeeView
procedure library.
If the file or cache contains a procedure name previously defined in the library, the new
procedure replaces the old procedure.
Note. The SeeView program issues the warning message “For Faster Access INVOKE
script” when it cannot operate as efficiently as possible. This occurs if the contents of
a script previously invoked are changed since it was last invoked. Reinvoking the script
allows SeeView to re-create a procedure-entry-point directory for the script and once
again operate efficiently without the need to search for procedures linearly.

Example
This example shows the INVOKE CACHE statement.

TASK myshell:=$foo CACHE 100; {declare cache for shell


DELETE myshell!; {clear cache
LOAD $system.system.SeeShell, myshell; {load SeeShell to memory
ALTER SHELL CACHE myshell; {so SF15 invokes memory version
INVOKE 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.

LEFT | L [ : expression [ : char ] ]

HPE NonStop SeeView Manual Page 215 of 365


expression
allows 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. For example:
RIGHT:3:# DOWN:3:# LEFT:3:# UP:3:#
This command draws a box:
###
# #
###
See also the RIGHT, DOWN, and UP statements.

Example
This example demonstrates the LEFT statement.

L:i:# {Moves for the current value of variable i, smearing #.


L {Moves one.
L:30 {Moves 30; note that moves can wrap around the screen.

R:10:-
D:10:|
L:10:-
U:9:| {Draws a box.

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.)

HPE NonStop SeeView Manual Page 216 of 365


 You can also specify integer assignments with a statement that begins with a left
parenthesis.

Example
This example demonstrates the LET statement.

LET x:=x+1; {
x:=x+1; { Are equivalent statements
(x:=x+1);

LINE
The LINE statement defines the current buffer address where the data generated by
SeeView statements is to appear on the current screen page. Use the PAGE or
SETPAGE statements to define the current screen page.

LINE 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 page.

column-exp
specifies the horizontal column location. Absolute column numbers range from 1
through 80, left to right. If you do not specify column-exp, column 1 is assumed.

Considerations
The upper left corner of the screen is LINE 1. The lower right is LINE 24, 80.

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;

HPE NonStop SeeView Manual Page 217 of 365


DO BEGIN
LINE L;
cpu := #TRIM #cpulist;
GRAPH cpu.busy KEY [cpu]
GRID 0 INVERT MASK(12m,6s)
HEAD "Cpu " & cpu & " Busy"
SIZE 80,height;
END UNTIL (L:=L+height)>24;

LINE25
The LINE25 statement emits a line 25 escape sequence. Text and video emitted after
the LINE25 statement appears in the line 25 status portion of the screen rather than
the current screen buffer address. (See also the
MSG statement.)
To terminate the LINE25 escape sequence, use either the BELL statement or a
carriage return character.

LINE25

Example
This example shows the LINE25 statement.

LINE25; PAGEMSG; BELL;

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.

LISTDEV [ DISC | TAPE | PRINTER | TERM ] TO taskid-exp


[ TYPE devtype ]
[ SUBTYPE subtype ]
[ DETAIL ]
[ HEADING ]
[ MORE count ]
[ START ldev-num ]
[ string-exp ]

DISC | TAPE | PRINTER | TERM


specifies that the device names of the designated device type, DISC, TAPE,
PRINTER, or TERM, are placed in the cache associated with the task identified by
the taskid-exp.

HPE NonStop SeeView Manual Page 218 of 365


TO taskid-exp
specifies the cache that the device names for the designated device types
should be stored.

TYPE devtype
specifies that device names with a devtype represented by an integer expression
should be stored in the cache associated with the task identified by the taskid-
exp.

SUBTYPE subtype
specifies that device names with a subtype represented by an integer expression
should be stored in the cache associated with the task identified by the taskid-
exp.

DETAIL
specifies that ldev-num, PPid, BPid, TYPE, SUBTYPE, and Rec-size are
displayed.

HEADING
displays column headings.

MORE count
allows you to control the maximum number of devices processed on each
LISTDEV request. Processing can be partitioned across many LISTDEV requests.
MORE also can indicate that more logical devices remain by MORE? appended to
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.

string-exp
specifies a string expression that contains one of these keywords:
DISC | DISK | TAPE | PRINTER | TAPE

HPE NonStop SeeView Manual Page 219 of 365


Examples
This example shows the LISTDEV statement.

?MENU DevMenu
?PROC ListDev (#DevType,Cacheid)
{------------------------------}
{ This proc stores a list of Device names
{ in CacheId of the type specified by #DevType.
{---------------------------------------------}
PARM #DevType { DISC,TAPE,TERM,..
, Cacheid { cache to list to.
;
DELETE Cacheid!; { Clear cache.
LISTDEV #DevType TO Cacheid;

WINDOW Cacheid MENU SIZE 13,24 PAGES


HEAD #DevType;

?SECT ShowDevices
{----------------}

CALL ListDev( "DISC", DevMenu );

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.
{-------------------------------------------------------------
parm Type IN { Device Type
,Count IN { Maximum number Ldevs to put in cache
,More := 0 OUT { <>0 implies more devs, call me again
;
var #List :="LISTDEV TYPE " & type &
" TO Ldevs MORE " & count &
" DETAIL START " { #Ldev
,#Ldev :="000000" { Start Ldev number
,#z { scratch vars #z, i, ..
,i
;
READ Ldevs CACHE -1,#z; { Look for <MORE?> from last call.
SCAN #z UNTIL "<MORE?>"->i;{ Scan last record for "<MORE?>"
IF (i) THEN BEGIN { If more, parse Ldev & clear cache
#Ldev:=#TAKE#z[10:20]; { Parse #Ldev from buffer
DELETE Ldevs!; { Clear for next set of Ldevs
END;
EXECUTE #List & #Ldev; { EXECUTE Listdev ... START <ldev>
READ Ldevs CACHE -1,#z; { Check if <MORE?> flag present
SCAN #z UNTIL "<MORE?>"->i;{ If <MORE?> found "i" nonzero.
IF (i) THEN More := 1; { More tells caller to call again

?SECT main
{---------

HPE NonStop SeeView Manual Page 220 of 365


{ Example call GetNextDevices
{----------------------------
VAR more;
DO BEGIN
CALL GetNextDevices(0,22,more);
WINDOW Ldevs CACHE LAST;
{ ... Ldev processing logic goes here ... }
MSG #Time; FLUSH;
END UNTIL NOT (more);
MSG #TIME & " done";

LOAD
The LOAD statement loads or places a specified file into a cache associated with a
taskid.

LOAD filename , cache-taskid

filename
specifies the file to be loaded.

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. CONTROLBUF Protocol

Operation Buffer Meaning Size in Bytes


0 Task's current volume/subvolume 16
1 Delete cache messages 2
2 Load cache with filename 24
3 Cache offset to display in window 2
4 Alter queueing mode 2

Example
The statements in this example set up a cache, load it with a file named MYFILE, and
display the file in a window.

TASK tutorial:=$null; {dummy task

HPE NonStop SeeView Manual Page 221 of 365


LOAD MYFILE,tutorial;
WINDOW tutorial CACHE;

LOCK / UNLOCK
The LOCK statement locks the keyboard. Use the UNLOCK statement to unlock it.

LOCK
UNLOCK
The LOCK statement locks the keyboard associated with the SeeView terminal. This
statement is primarily intended for script implementations that make it desirable to
keep the keyboard locked while a script is being executed.
Normally when the Return or Shift-Return key is pressed, the SeeView program
immediately unlocks the keyboard so that the user can proceed to type ahead while a
script is executing. However, certain situations might make it undesirable for the
keyboard to remain unlocked while the script is executing, especially if doing so might
confuse the user. Thus you can use the LOCK statement to control keyboard locking.
Use of the LOCK statement places the responsibility of unlocking the keyboard with
the script writer. The UNLOCK statement performs this keyboard unlock function.
When in doubt, to keep users productive allow concurrency by not locking the
keyboard.

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.

MSG [ ( REVERSE | R ) ] string-exp

HPE NonStop SeeView Manual Page 222 of 365


[ ( DIM | D) ]
[ ( UNDERLINE | U ) ]
[ ( BLINK | B ) ]

REVERSE, DIM, UNDERLINE, BLINK


specifies video highlighting of the message. You can specify one or more of these
video attributes, and you can abbreviate them to a single letter. You must enclose
each video attribute (or its abbreviation) in parentheses.

string-exp
specifies a string expression indicating the message to be displayed on line 25.

Note. The Seedit utility also has a MSG statement, different from this MSG statement.

Example
This example shows the MSG statement.

IF #TAKE #TIME <12 THEN


MSG "GOOD MORNING"
ELSE
MSG "GOOD AFTERNOON";

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.
The primary purpose of this statement is to change the current SeeView shell file
and to change the current default volume to be the same as that of the current
SeeView shell file.

section-name
specifies that only a particular section in the shell-filename is invoked
when the shell is invoked. See also ALTER SHELL option.

HPE NonStop SeeView Manual Page 223 of 365


Considerations
You can use the ON statement in a SeeView startup message to alter the default
volume and subvolume of the following SeeView attributes: SHELL, DICTIONARY,
SAVEFILE, TRACEFILE, and default VOLUME.
Use the ALTER statement to individually alter these file attributes, display their
settings, or both.

Example
This example shows how to use the ON statement.
RUN SeeView /NAME/ ON $data.xyz.myscript

OPEN
The OPEN statement declares a user program taskid and creates a window for it.

OPEN taskid [ := object ] [ startup-string-exp ]


[ BLOCKEDIO ON | OFF ]
[ CACHEPAGES pages ]
[ CPU cpu-number ]
[ DEVTYPE PROCESS | TERMINAL ]
[ HIGHPIN ON | OFF ]
[ LIB library-filename ]
[ NAME process-name ]
[ ONMYVOL ]
[ ONOBJVOL ]
[ PRIORITY process-priority ]
[ QUEUE ON | OFF ]
[ STARTUP string-exp ]
[ SWAP swap-filename ]
[ TIMEOUT nodata-secs , data-secs]
[ VOLUME subvol | str-exp ]
taskid
specifies a symbolic identifier associated with a program defined to the SeeView
program.
If this identifier is unknown, the SeeView program attempts to start a program with
this name on the $system.system subvolume and build a window for the program.
This type of OPEN statement also causes a taskid to be declared with the same
name as the program name. Once a program is declared, subsequent references
to the program name are actually references to its taskid.

HPE NonStop SeeView Manual Page 224 of 365


object
specifies the object portion of the OPEN statement. If object name is the name of
a program, that program is started and declared as taskid.
If you do not specify the :=object portion of the OPEN statement, taskid is
used to determine if there is a task with taskid already declared. If a task with
that taskid already exists, a window is built for that task. Otherwise, if taskid is
not known, the taskid is assumed to be a program name on the $system.system
subvolume. That program is started and a taskid is declared with that program
name. Thus if OPEN TACL were specified and no taskid for TACL existed, the
OPEN statement would start a program named TACL on $system.system and
declare a taskid symbolic identifier with the name of TACL.
Once the task associated with taskid is determined, declared, and started, a
window is built for that task.

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 [line-
feed] characters.
BLOCKEDIO ON indicates that each interprocess message from taskid is
parsed into multiple logical messages if that IPC has text containing carriage-
return [line-feed] characters.
BLOCKEDIO OFF is the default, unless the name of the object file is NETACL.

CACHEPAGES pages
defines the number of cache memory pages to be allocated to this task. Cache
memory is used to store messages from the specified taskid.
CACHEPAGES has meaning only the first time a taskid is declared, and once
declared cannot be changed.

CPU cpu-number
indicates the processor number in which the program should be created. CPU has
meaning 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
CPU assignments indicated by $CMON.

HPE NonStop SeeView Manual Page 225 of 365


DEVTYPE PROCESS | TERMINAL
specifies the type of device that the SeeView program will emulate for the declared
task. OPEN FUP DEVTYPE TERMINAL causes the SeeView program to return
devtype 6,0 to FUP DEVICEINFO calls. OPEN FUP DEVTYPE PROCESS causes
the SeeView program to return type 0,0 to the FUP task.
DEVTYPE works only when you enable subtype 30 in the SeeView object file. To
do this, use the following BIND command:
CHANGE SUBTYPE 30 IN SEEVIEW
The procedure DEBUGPROCESS requires that TERMINAL device type for the file
where the debug prompt is to appear. Before attempting to use the TACL DEBUG
command, check that the device type returned to TACL by the SeeView program is
a TERMINAL. To do so any time, enter this SeeView statement and press Shift-
Return.
OPEN TACL DEVTYPE TERM

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.
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_.
OFF implies TASK, RUN, OPEN statements should attempt to launch low PIN
processes. When this option is off, processes are started using the Guardian
procedure NEWPROCESS.
The intrinsic #TASKPROC returns the name of the Guardian procedure used to
create the process. This intrinsic is useful as an aid to interpreting error codes
returned by the intrinsics #TASKERRORTYPE and #TASKERROR. The values
returned depend on which procedure was used to launch the process. For
information on error codes returned by the procedures PROCESS_CREATE_ and
NEWPROCESS, see the Guardian Procedure Calls Reference Manual.

LIB library-filename
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.

HPE NonStop SeeView Manual Page 226 of 365


NAME process-name
specifies the process name assigned to the newly created process.

ONMYVOL
indicates that the program object file name specified in the task object-name is
expected to exist on the current default SeeView volume and subvolume. You can
alter the default SeeView volume with the ALTER VOLUME statement. To
programmatically access the volume, use the #VOLSUB string intrinsic.

ONOBJVOL
indicates that the program object file name specified in the task object is
expected to exist on the same volume and subvolume as the current SeeView
program object file. To programmatically determine this volume, use the
#VOLSUBOBJECT string intrinsic.

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.
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. It is the default.
Typically, the only time you need to specify QUEUE ON is to assert programmatic
synchronization in a script that performs complex interleaving of communication
between multiple processes. QUEUE ON always ensures communication
synchronization in a script for a single process.

STARTUP string-exp
specifies the startup message sent to the newly created process, where
string-expression represents the string written to the new process.

SWAP swap-filename
specifies the name of the file used for the page swapping of a process‟s virtual
user data space.

HPE NonStop SeeView Manual Page 227 of 365


TIMEOUT nodata-secs , data-secs
specifies the number of seconds that a SeeView script waits for data from the task.

nodata-secs
specifies the number of seconds that a WINDOW, READ, or
WRITE statement waits for initial communication from the task.

data-secs
specifies the number of seconds that a WINDOW statement waits for
subsequent messages from the task. (See also the ALTER
NODATATIMEOUT and ALTER DATATIMEOUT statements.)

VOLUME subvol | str-exp


specifies the default volume and subvolume for the task being declared.
VOLUME takes effect only when you are creating the program associated with the
taskid.
You can literally specify the volume and subvolume. For example:
VOL $DATA.MYSUBVOL
Or you can use a string expression:
VOL #mysubvol

Example
This example shows the OPEN statement.

OPEN fup; { Same as TASK fup :=fup; WINDOW fup


OPEN comint; { Same as TASK comint:=comint; WINDOW comint
OPEN ci:=comint; { Same as TASK ci :=comint; WINDOW ci;
OPEN zoom:=$DATA.X.Y { Same as TASK zoom :=$DATA.X.Y; WINDOW zoom;

PAGE
The PAGE statement specifies which terminal page to display and where output from
subsequent SeeView statements appears.

PAGE page-exp

HPE NonStop SeeView Manual Page 228 of 365


page-exp
specifies an integer expression indicating the terminal page number. page-exp
can range from 1 through the maximum page number returned by the
#LASTPAGE intrinsic. (This value is displayed as m in the “Page n of m” display on
line 25.)

Considerations

 User pages range from 1 through #LASTPAGE. You can programmatically select
the Help page with #LASTPAGE +1. This example summarizes how to
programmatically access the terminal pages in the SeeView environment.

PAGE 1;{Select first User Page


PAGE #LASTPAGE;{Select last User Page
PAGE #LASTPAGE + 1{Select the Help Page.

 The PAGE statement causes both terminal I/O and visual display to appear on the
same terminal page. To select different pages for terminal I/O and visual display
(for example, to display off-screen I/O), use the SETPAGE and
SHOWPAGE statements.

Example
This example shows how to use the PAGE statement.

VAR #pages := #PAGESUSED; { #pages is list "1 2 3 4"


WHILE #pages<>"" DO BEGIN { While #pages left,
PAGE #TRIM #pages; { Show each page,
FLUSH; { for 1 second,
WAIT 1,REFRESH; { and refresh windows.
END;

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.

HPE NonStop SeeView Manual Page 229 of 365


Example
This example shows the PAGEMSG statement.

LINE25; PAGEMSG; BELL;

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. You can use an initialization expression to
specify the initial value of the parameter being declared. For example:

?PROC DrawTaclWindow ( width, height, error )


{-------------------------------------------}
PARM width := 80 IN; (default input value)
PARM height := 24 IN; (default input value)
PARM error := 0 OUT; (default output value)

TASK tacl ALLOWERROR;


IF #TASKERRORTYPE THEN BEGIN
error := #TASKERRORTYPE;
return;
END;
WINDOW * SIZE width,height;

When PARM is a by-value parameter with an initialization expression specified


(such as width:= 80 above) and the caller passes that parameter (as in CALL
DrawTaclWindow(60);) the value passed by the caller is the initial value of the
parameter (width 60) rather than the value of the initialization expression (width
80). If the caller does not supply the parameter, the initialization expression is the
value of the parameter. Thus width is 80 for CALL DrawTaclWindow.
When PARM is a by-reference parameter (indicated with IO or OUT) and you
specify an initialization expression, such as error:=0, the initial value is that of the
initialization expression, regardless of whether you supply a parameter.

HPE NonStop SeeView Manual Page 230 of 365


All procedure parameters are optional. You do not need to supply even OUT
parameters. The interpreter automatically handles these unresolved references.

IN
indicates that the variable is a by-value parameter. Value assignments within the
procedure are not returned to the caller. This value is the default.

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. You must declare
parameters in the same order they are passed in the CALL statement.

 You can specify initial values for the parameter at declaration.
 All parameters are optional.
Examples
These two examples demonstrate the PARM statement.

 The first example follows:


?MENU person
{-----------}
Name [John Smith ]<==?
Address [500 Park, AnyTown, IL ]<==?
Phone [708-555-5555 ]<==?
*
?PROC GetPerson ( #firstName, #lastName, #address, #phone, escape)
{----------------------------------------------------------------}
{ This proc prompts for a person's name, address, and phone number.
{
{ A panel is first displayed prompting for this information.
{ The panel information is then accepted when a function key is
{ pressed. The first and last names are parsed from the name
{ field, and the proc then returns the #firstName, #lastName,
{ #address, and #phone number.
{

HPE NonStop SeeView Manual Page 231 of 365


{ 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.
;
VAR #name; { local variable #name
BESIDE; { Display Input panel
WINDOW person MENU { using person cache,
CACHE FIRST { from first line
UNTIL /*/ SIZE 45 { until *, 45 wide,
GLASS { with glass and head.
HEAD "Enter Person (F16-escape)";
FLUSH; { display it now!

LINE #MENULINE,#MENUCOL+#MENUWIDTH; { Accept from area.


ACCEPT #name, #address, #phone FKEYWAIT; { Accept into parms.
CW; { Clear input panel.
IF #FKEY=16 THEN BEGIN { Check for escape.
escape := 1; { flag escape.
RETURN; { return if escape.
END;
#firstName := #TAKE #name; { Parse first name
#lastName := #DROP #name; { Parse last name
{ return implied.
?PROC NextPerson ( esc );
{-----------------------}
{ This proc calls GetPerson, and if not escape then
{ displays a message on line twenty-five verifying
{ the data input. Note the script could then save
{ the data in cache or to a disc file, or data base.
{--------------------------------------------------}
PARM esc := 0 OUT; { <> 0 implies no more input.
VAR #first { First name (parsed)
,#last { Last name (parsed)
,#addr { address
,#ph { phone number
;
CALL GetPerson(#first, #last, #addr, #ph, esc);
IF esc THEN BEGIN
MSG "Done."
RETURN;
END;
MSG #last &", "& #addr &", "& #ph;
{MSG = Smith, 500 Park, Anytown, IL, 708-555-5555

?SECT main
{---------}
VAR done:=0;
MSG "Enter person data.";

WHILE NOT done DO BEGIN


CALL NextPerson(done);
END;

 The second example follows:

HPE NonStop SeeView Manual Page 232 of 365


?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, .. return user data entered into the panel.
{ Note that #field.. and #p.. parms are dynamically declared.
{-------------------------------------------------------------}
VAR i:= 0
, fldcnt := 7 { number of fields to dynamically declare
, passcnt:= fldcnt { number of fields actually passed
, width { width of menu
,#s { scratch string variable
,#parms { contains "#p1, #p2, #p3, .."
;
FOR fldcnt DO BEGIN { declare PARM #field1, #p1 ..
EXECUTE "PARM #field" & (i:=i+1) & " OUT";
EXECUTE "PARM #p" & (i) & " OUT";
#parms:=#parms & "#p" & (i) & ",";
EXECUTE "#s:= #field" & (i);
IF #s<>"" THEN BEGIN { #s is value in #field-i
PUSH #s & "<==?" ONTO Panelmenu;
IF #SIZE #s>width THEN width := #SIZE #s;
END ELSE { parm #field-i not passed
IF passcnt=fldcnt THEN
passcnt := i-1; { number of parms passed
END;
BESIDE; { display input panel
WINDOW Panelmenu MENU
GLASS HEAD "Enter data (F16-escape)"
CACHE INDEX -passcnt
SIZE width+4,passcnt+2
UNLOCK;
FLUSH; { accept user input
EXECUTE "ACCEPT FKEY " & #parms[1:#size#parms-1];

?PROC GetPerson
{--------------}
{ Define and accept data from panel:
{
{ Name [ ]
{ Addr [ ]
{ Phone [ ]
{
{-------------------------------------------}
VAR #name
, #addr
, #ph
;
CALL Panel("Name [ ]", #name,
"Addr [ ]", #addr,
"Phone [ ]", #ph);
IF #FKEY=16 then return;

HPE NonStop SeeView Manual Page 233 of 365


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.";

WHILE (#FKEY<>16) DO BEGIN


CALL GetPerson;
END;

CLEARW;

PLOT
The PLOT statement defines the current screen buffer address. The buffer address
indicates where the output data from statements appears on the current page of the
screen.

PLOT column-exp , row-exp

column-exp
indicates the horizontal column location. Columns range from 0 (zero) through 79,
left to right.

row-exp
indicates the vertical row or line location. Rows range from 0 (zero) through 23, top
to bottom.

Considerations

 The upper left corner of the screen is PLOT 0,0. The lower right is set at
PLOT 79,23.

 The PLOT and LINE statements provide essentially the same functions but use
different coordinate systems.

Example
This example demonstrates the PLOT statement.

VAR row:=0;
PLOT 0,0;

HPE NonStop SeeView Manual Page 234 of 365


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. If you do not specify TAIL, the first element
is removed.

Considerations
#string-var can be null, “ ”, only if the cache is depleted. Otherwise, “ ” is popped
even if the element was null.

Example
This example shows the PUSH and POP statements.

?SECTION qpush
{-------------}
{ Build a cache "q" of pup listdev info, and present window on data
{----------------------------------------------------------------}
VAR #s,eof,row,col;
TASK pup :=pup;
TASK q :=$null;
DELETE q!;
WRITE pup,"listdev disc"; {do a listdev
PUSH "Current Disc Process 'active' Paths" ONTO q; {push heading
PUSH "" ONTO q; {skip a line
DO BEGIN
READ pup,#s,eof;
IF #s[20]="*" THEN PUSH #time & #s[1:50] ONTO q; {push *'ed lines
END UNTIL eof;
PAGE 1; CLEAR; {display result
WINDOW q CACHE; {in window.
?SECTION qpop
{-----------}

HPE NonStop SeeView Manual Page 235 of 365


{ Display data from a taskid's cache on terminal page 2.
{------------------------------------------------------}
LET row:=-1; LET col:=0;
PAGE 2; CLEAR;
DO BEGIN {display Q data
POP #s FROM q; {"outside" of
PLOT 0,(row:=row+1); {a window
"" & #s;
END UNTIL (#s="") OR (row>22);

PRINT
The PRINT statement displays the value of an integer variable, string variable, or
string/numeric expression.

PRINT * | string-exp | expression [, … ]

*
displays all user variables and their values. This option displays recent local
variable values for the last procedure call sequence.

string-exp | expression
specifies the integer variable, string variable, or string/numeric expression to be
printed.

Example
This example shows how to use the PRINT statement.

PRINT X,Y,Z
PRINT #S, #TAKE #S

PROMPT
The PROMPT statement prompts the output file for input when SeeView runs in CI-
mode (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. For
example: PROMPT #USERNAME & " " & #TIME & " > ", #Input;

HPE NonStop SeeView Manual Page 236 of 365


string-var
specifies the string variable name that will receive PROMPT data input bytes.

error
specifies an optional integer variable name that is set to the PROMPT file-system
error. For example, an error 1 is an end-of-file error returned when control-Y is
pressed. Error 40 occurs when a timeout occurs, if timeout is specified. If no
error option is specified and if a prompt I/O error occurs, SeeView reports a
runtime error on the prompt statement.

timeout
specifies an optional PROMPT timeout in seconds. If no timeout is specified,
PROMPT waits until the user inputs data and presses enter. While the PROMPT
waits for input, SeeView continues processing of interprocess I/O and $RECEIVE
messages. When timeout is equal to -1, the default, the prompt waits indefinitely
for user input. When timeout is greater than zero, PROMPT statements can
timeout, allowing scripts to timeout prompts.

Considerations
SeeView runs in three different modes:

 Block mode - server mode 0


 Server mode - server mode 1 or 2
 CI mode - server mode 3 or 4
Examples

Example #1
RUN SEEVIEW CI $data.test.prompt
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

HPE NonStop SeeView Manual Page 237 of 365


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.

PUSH string-exp ONTO taskid | *

string-exp
specifies the string expression to be copied.

ONTO taskid
specifies the user task.

Considerations
When a null string, “ ”, is pushed, it is stored as such. However, a single blank, “ ” is
returned for a POP operation. This simple means tests for an empty cache.

Example
This example shows the PUSH and POP statements.

?SECTION qpush
{-------------}
{ Build a cache "q" of pup listdev info, and present window on data
{----------------------------------------------------------------}
VAR #s,eof,row,col;
TASK pup :=pup;
TASK q :=$null;
DELETE q!;
WRITE pup,"listdev disc"; {do a listdev
PUSH "Current Disc Process 'active' Paths" ONTO q; {push heading
PUSH "" ONTO q; {skip a line
DO BEGIN
READ pup,#s,eof;
IF #s[20]="*" THEN PUSH #time & #s[1:50] ONTO q; {push *'ed lines
END UNTIL eof;
PAGE 1; CLEAR; {display result
WINDOW q CACHE; {in window.
?SECTION qpop
{-----------}
{ Display data from a taskid's cache on terminal page 2.
{------------------------------------------------------}
LET row:=-1; LET col:=0;
PAGE 2; CLEAR;
DO BEGIN {display Q data
POP #s FROM q; {"outside" of

HPE NonStop SeeView Manual Page 238 of 365


PLOT 0,(row:=row+1); {a window
"" & #s;
END UNTIL (#s="") OR (row>22);

READ
The READ statement reads data from a user task or a cache associated with a user
task.

READ taskid |*[PEEROK|CACHE index] [,[read-count ] [,error] ]


[,[#string-var] ]

taskid
specifies the taskid of the task to be read. (For information regarding taskids,
see the
TASK statement.)

*
causes the CACHE option to access the SeeView message cache rather than a
taskid cache. The asterisk option requires the use of the CACHE option.

PEEROK
indicates that the READ can complete when any peer task associated with the
specified taskid writes a message to the SeeView program. Peer tasks are all
tasks that have the same $SeeView-process-name #taskid subdevice
opened.
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. CACHE indexes 0, 1, 2, …,
correspond to the first, second, third, …, records in cache. Indexes -1,-2,-3, …,
correspond to the last, second from last, third from last, …, records in cache.

HPE NonStop SeeView Manual Page 239 of 365


read-count
transfers the data read from the taskid to the current screen buffer address.

error
specifies that the result of the READ statement is programmatically determined by
setting an integer variable to one of these values:

0 if data was read without an error.

1 if the task is prompting for input, or an end-of-file is encountered when using the
CACHE option.
40 if a read timeout occurred. (See the TIMEOUT option of the TASK statement.)

-5 if the task has stopped.

-6 if the task has ended abnormally (abended).

#string-var
transfers data to the string variable rather than to the screen.

Example
This example shows the READ statement.

VAR #s;
TASK f:=fup;
WRITE f,"copy xyz";
WITH f;
DO BEGIN
READ f,#s;
IF (NOT #taskprompting) AND (#TAKE #s)="MYDATA" THEN BEGIN
[#s]; { show all records starting with the word MYDATA
END;
END UNTIL #TASKPROMPTING;

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

HPE NonStop SeeView Manual Page 240 of 365


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.

 In scripts that contain multiple sections and have explicit returns in them, the next
section in the script is executed when a RETURN is encountered.

Example
This example shows the use of the RETURN statement.

?PROC CurrentDate
{----------------}
IF #DATE[4:8] = "01/01" THEN BEGIN
MSG (REVERSE) "Happy new year"; BELL;
RETURN;
END;
MSG "Date " & #DATE;

RIGHT
The RIGHT statement moves the buffer address right, relative to the current buffer
address. RIGHT and the abbreviation R are synonymous. You can interchange them.

RIGHT R [ : expression [ : char ] ]

expression
allows 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. For example:
RIGHT:3:# DOWN:3:# LEFT:3:# UP:3:#
This command draws a box:
###
# #
###
See also the LEFT, UP, and DOWN statements.

HPE NonStop SeeView Manual Page 241 of 365


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.

Example
Enter this example from a window to paste a video-highlighted ruler to the top of that
window.

UP LEFT V(R D) RULER V();

RUN
The RUN statement starts a specified program and passes complete control of the
terminal to that program until the program is stopped or abends.
The RUN statement is useful for temporarily leaving the SeeView environment to run a
program that cannot execute within a window. Upon exiting this program, all windows
and their associated programs are returned to the same state as before the RUN
statement executed.

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 ]

HPE NonStop SeeView Manual Page 242 of 365


[ 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. Program can be either an external file name such as
$DATA.MYSUBVOL.MYPROG or a string expression that contains an external file
name such as RUN #VOLSUB & “myprog”.

startup-message
specifies a startup message either:

 As text after the program-fname [ / opt [, opt … ] / ] part


 As a string expression (string-exp) if you use the STARTUP option (See
the following information.)
When you specify the startup-message as text after the program name, it
must not contain semicolons unless you enter it from a window sill or it appears in
a menu production. When you use the RUN statement in a script, you must specify
semicolons by using the STARTUP string-exp syntax. Thus, the parse for the
RUN statement behaves differently when it appears in a menu production (or
window sill) than when it appears in the body of a SeeView script.
When a RUN statement appears in a menu production, for example, all text after
the program-fname is interpreted as the startup-message, even though it
might contain semicolons.
MyProg <== RUN PATHCOM $PM; RUN PROGRAM MYPROG
It is often desirable to correlate menu items with RUN statements and their
corresponding startup-messages without requiring the script writer to have a
separate procedure for each menu item.
When the RUN statement appears as part of a script, this style of parsing is not
permitted, and you must use the optional STARTUP string-exp syntax to
specify a startup-message that contains semicolons.

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. The #TASKPROC intrinsic

HPE NonStop SeeView Manual Page 243 of 365


indicates whether NEWPROCESS or PROCESS_CREATE_ was used in the
attempt to declare the task. For example:
RUN FUP ALLOWERROR;
IF #TASKPROC = "PROCESS_CREATE_" THEN BEGIN
IF #TASKERRORTYPE=1 AND #TASKERROR=11 THEN BEGIN
MSG "File not present";
END;
END;
IF #TASKPROC = "NEWPROCESS" THEN BEGIN
IF #TASKERRORTYPE=3 AND #TASKERROR=11 THEN BEGIN
MSG "File not present";
END;
END;

CPU cpu-number
indicates the processor number in which the program is created. The SeeView
program communicates with $CMON when it is present and tries to use CPU
assignments indicated by $CMON.

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.
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_.
OFF implies TASK, RUN, OPEN statements should attempt to launch low PIN
processes. When this option is off, processes are started using the Guardian
procedure NEWPROCESS.
The intrinsic #TASKPROC returns the name of the Guardian procedure used to
create the process. This intrinsic is useful as an aid to interpreting error codes
returned by the intrinsics #TASKERRORTYPE and #TASKERROR. The values
returned depend on which procedure was used to launch the process. For
information on error codes returned by the procedures PROCESS_CREATE_ and
NEWPROCESS, see the Guardian Procedure Calls Reference Manual.

IN filename
specifies the input file.

HPE NonStop SeeView Manual Page 244 of 365


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. To alter
the default SeeView volume, use the ALTER VOLUME statement. To
programmatically determine the volume, use the #VOLSUB string intrinsic.

ONOBJVOL
indicates that the program object file name specified in the RUN program is
expected to exist on the same volume and subvolume as the current SeeView
program object file. To programmatically determine the volume, use the
#VOLSUBOBJECT string intrinsic.

OUT filename
specifies the output file.

PRIORITY process-priority
specifies the execution priority of the new process. The SeeView program
communicates with $CMON when it is present and tries to use assignments
indicated by $CMON.

STARTUP string-exp
specifies the startup message sent to the newly created process. (See the RUN
statement description of startup-message.)

SWAP swap-fname
specifies the name of the file used for the page swapping of a process‟s virtual
user data space.

VOLUME subvol | str-exp


specifies the default volume and subvolume for the task being declared.
You can literally specify the volume and subvolume. For example:
VOL $DATA.MYSUBVOL

HPE NonStop SeeView Manual Page 245 of 365


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"/ { ok anywhere


RUN pathcom $mypm;run program myproc { ok from sill or menu
RUN tedit myfile

SAVE
The SAVE statement saves data associated with a task‟s cache memory.

SAVE [filename [APPEND]] [!] [,cache-taskid] [,error]


[, * ]

filename
specifies the disk file to which the SAVE statement permanently saves data. The
task's operational status is not affected.
You can specify the file name directly as part of the statement. For example:
SAVE $data.mysubvol.myfile, #taskid
Or you can specify it as a string expression. For example:
SAVE #myfile, #taskid

APPEND
appends the contents of the specified cache to the end of the specified filename.

!
purges the contents of the file represented by filename (if it exists) and saves the
cache as filename.

cache-taskid
specifies that the cache associated with taskid is saved. When you use the
SAVE statement in a script, cache-taskid or * is required.

HPE NonStop SeeView Manual Page 246 of 365


error
if the return error option is specified and a SAVE file-system error occurs, the
error value is returned in the error integer variable, and no interpreter run-time
error occurs. This enables the programmer to handle error reporting and recovery.

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. The cache
copy of the file is only a copy and not the actual file. Type ESCAPE to exit edit mode
without saving the cache to a file. However, you can reenable edit mode and perform a
subsequent save.

Example
This example shows the SAVE statement issued from a SeeView script.

TASK comint:=$system.system.comint;
DELETE comint!;
WRITE comint,"status *,term";
WRITE comint," "; {force SeeView to wait for all of the response
SAVE junk.myterm!,comint;

This example shows a SAVE statement are issued from a window in edit mode. S is an
abbreviation for SAVE only when it is entered from the sill of an edit-mode window.

SAVE ? { display name of cache copy of file (if defined)


SAVE { save cache copy of file to file (purges old file)
S { (same meaning as above)
S! { (same meaning as above)
SAVE X { saves cache text to file X (if X does not exist)
SAVE X! { saves cache text to file X (and purges X if it exists)

SCAN
The SCAN statement finds a target string in a string expression or scans a string
expression while a certain character exists.

SCAN [ BACK ] scan-string UNTIL target-string -> int


WHILE target-char -> int

BACK
specifies that the string is scanned backward, from right to left. Not specifying
BACK causes the string to be scanned from left to right (the default).

HPE NonStop SeeView Manual Page 247 of 365


scan-string
specifies a string expression that represents the string to be scanned. If scan-
string is a string variable, you can follow it with a simple index to indicate where
the scan starts. Thus SCAN #s[5] UNTIL "." indicates that the scan for the period
character is to start with the fifth character in the scan string #s. You can also
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. For example:
SCAN #s UNTIL "apple";

WHILE target-char
specifies that the scan of the scan-string is to continue while the character
represented by the target-char continues to exist. Thus
SCAN "...x" WHILE "."->i;
sets “i” to a value of 4. For the target-char, you can use any string
expression that yields a single character, such as “.” or #char(c+i).

int
stores the string index 1...132 where the condition exists in the integer variable
represented by int if the condition is satisfied. If the condition is not satisfied,
it sets int-var to 0 so that it can be used as a Boolean.

Example
This example shows the SCAN statement.

VAR #s := "...x..x";
SCAN "the 123 is the target" UNTIL "123" -> X; { X = 5
SCAN "the 123 is the target" UNTIL "124" -> X; { X = 0
SCAN "...x..x" WHILE "." -> X { X = 4
SCAN #s WHILE "." -> X { X = 4
SCAN #s[5] WHILE "." -> X { X = 7
SCAN BACK #s[5] WHILE "." -> X { X = 4

HPE NonStop SeeView Manual Page 248 of 365


SEARCH
The SEARCH statement searches the specified taskid cache for text. The search is not
case-sensitive.

SEARCH taskid CACHE [+|-] target -> line [, col ]


[ LINEFOUND string-var ]
[ MENUTEXT ]
[ STARTING line [ , col ]

taskid
specifies the taskid of the cache that is searched for target.

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. For the target string, you can use either a
string expression that consists of string variables, string literals or both, or
literal text delimited by a pair of slash or backslash characters such as /target/
or \target\.
If the target is found, the integer variables specified by line (and optionally
col) are set to the cache line (and column) where the target was found. If the
target is not found, the line (and optionally column) are set to a minus 1 (- 1)
value.

-> line [, col ]


specifies integer variables to be set to the line and column numbers where
target was found.

line
specifies an integer variable that is set to the value of the ordinal cache
line number where target was found. Integer values for line are zero
relative, so a line value of zero is the first line of cache.

HPE NonStop SeeView Manual Page 249 of 365


col
specifies an integer variable that is set to the value of the column number
where target was found. Integer values for col are 1 relative, so a
column value of 1 is the first character in the line.

LINEFOUND string-var
assigns a string variable, string-var, to the line of text that contains the
target.

MENUTEXT
restricts the search to text only to the left of any production symbols (<==) that are
present in cache.

STARTING line [, col ]


indicates the ordinal index where the cache search should start. For example
STARTING 0, 1, 2, ... corresponds to the first, second, or third line in cache, and
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.

?MENU myData
line 1 {cache index 0
line 2 {cache index 1
line 3 {cache index 2

?SECT Main
VAR L {cache line index
, C {cache column number
, #s := "2"; {target
;
SEARCH MyData CACHE #s -> L,C; { L and C will be L=1, C=6

This procedure uses a SEARCH statement to search through a cache, changing all
occurrences of #target to #newtext. (The search is not case-sensitive.)

HPE NonStop SeeView Manual Page 250 of 365


?PROC ChangeCache(Cacheid,#target,#newtext)
{-----------------------------------------}
{ Change all #target to #newtext for "Cacheid".
{ Note that the cache search is NOT case sensitive.
{-------------------------------------------------}
PARM Cacheid { taskid of cache to scan
,#target { target text to change
,#newtext { text to replace target
;
VAR #s { scratch string var
,#before { text before target
,#after { text after target
, r:=0 { record no in cache
, c:=0 { column no in cache
;
DO BEGIN { Loop while target found
SEARCH Cacheid CACHE #Target
STARTING r,c -> r,c
LINEFOUND #s;
IF r<0 THEN RETURN; { Target not found, done.

#before:=""; { text in #s before target


#after :=""; { text in #s after target
IF c>1 THEN { there is text before
#before:=#s[1:c-1];
IF (c+#SIZE #target) < (#SIZE #s) THEN
#after := #s[c+#SIZE #target:132];
#s:= #before & #newtext & #after;
{ #s updated, now update record in cache
WRITE Cacheid CACHE r UPDATE,#s;
c:= c + #size #newtext;
END UNTIL r<0;
?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.
EXE "WITH " & #Cache; { Get "WITH Cachename"

BELOW;
WINDOW #taskid CACHE FIRST SIZE 80,8; { Show cache before changes
IF #Target=""or#NewText=""THEN RETURN;

CALL ChangeCache(#TASKID, #Target, #NewText);

DOWN:8;
WINDOW #taskid CACHE FIRST SIZE 80,8; { Show cache after changes

?SECT main
{---------}
BESIDE; CW;

HPE NonStop SeeView Manual Page 251 of 365


WINDOW ChangeWhat MENU "CALL Change"
FOR 3 SIZE 30 FIELDS(u);

This example produces this output:

vst909

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.

HPE NonStop SeeView Manual Page 252 of 365


ENABLE
permits use of a restricted statement (stmt) or function key (fkey).

*
signifies ENABLE all statements and function keys.

SILL
limits restriction to interactive sill input. When you specify SILL, the restriction
applies only to statements entered interactively.
SILL is the default.

ANY
restricts any and all use of a stmt or fkey.

stmt
refers to any of the statements described in this manual.

Fkey
refers to these keywords:
F1 … F16 BREAKKEY
SF1 … SF16 INSERTLINE
DELETELINE ROLLDOWN
ROLLUP SROLLDOWN
SROLLUP PREVPAGE
NEXTPAGE SPREVPAGE
SNEXTPAGE SRETURN
RETURNKEY

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 HPE NonStop files.

Example
These examples show the SECURE statement.

SECURE OPEN { prevent interactive use of OPEN statement}


SECURE SECURE{ prevent interactive use of secure stmt}

HPE NonStop SeeView Manual Page 253 of 365


SECURE ANY SECURE{ prevent any use of the SECURE statement}
SECURE SF6 SF7{ prevent use of delete and create window}

SETPAGE
The SETPAGE statement directs host data input and output to a page other than the
one currently displayed through the
SHOWPAGE statement.

SETPAGE expression

expression
specifies a page other than the one currently displayed through the SHOWPAGE
statement to direct host data input and output. Values less than one are not
allowed.

Example
This example shows the SETPAGE statement.

VAR pg:=0;
FOR 6 DO BEGIN {Clear pages 1-6 without showing them
SETPAGE (pg:=pg+1);
CLEAR;
END;

SHOWPAGE
The SHOWPAGE statement displays a terminal page other than the one to which host
data input and output are currently directed.

SHOWPAGE expression

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 {Display each page for 2 seconds
SHOWPAGE (pg:=pg+1);
WAIT 2;

HPE NonStop SeeView Manual Page 254 of 365


END;

SHUTDOWN
The SHUTDOWN statement stops the SeeView program and all associated user-
defined tasks.

SHUTDOWN [ EXCEPT { TASKS | PEERS } ]

EXCEPT TASKS
indicates that tasks are not stopped when SeeView is shut down.

EXCEPT PEERS
indicates that any peer tasks not declared directly via a
TASK statement are not stopped when SeeView is shut down.

Considerations
This statement is similar to pressing SF16 twice. That is, shutdown cannot occur if any
windows are in edit mode. This prevents accidental loss of edited text in any edit-mode
windows.

Example
This example shows the SHUTDOWN statement.

HPE NonStop SeeView Manual Page 255 of 365


?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.
FOR #TASKCOUNT DO BEGIN {Build list of editmode windows, if any.
WITH taskno:=taskno+1;
editpg := #TASKEDITMODE; {Built-in returns pg <> 0, if editmode.
IF editpg THEN {editpg is page number of editmode window.
PUSH "Page " & editpg & ", " & #TASKSYMBOL & "<==PAGE " &editpg
ONTO mymenu;
END;
WITH mymenu; { With mymenu taskid.
IF #TASKCACHELINES THEN BEGIN { One or more editmode windows found.
LINE 4,#MENUWIDTH; { Show a menu that vectors to them.
WINDOW mymenu MENU FOR #TASKCACHELINES SIZE 22 HEAD "Editmode Windows";
MSG (R) "Cannot shutdown, windows are in Editmode";
RETURN;
END;
SHUTDOWN;

STATUS
The STATUS statement displays the status of processes that are communicating with
the SeeView program.
The STATUS statement includes information about the total number of system and
user messages received by SeeView. This statement also displays the number of
IOPOOL pages used and allocated and the total number of IOPOOL gets and puts
since SeeView was started.
Function key F13 displays TASK status in the largest free window on the Help page.

STATUS [ taskid | * ]

taskid | *
displays status information for one specific taskid. Use the asterisk * to display
menu data information in addition to task data regardless of the setting of the
ALTER MENUSTATUS option. (See ALTER 160.)

Example
A sample status display follows:

Taskid Cpu,Pin Name CachePg Timeout Seeview - T6965D40 - (02FEB95)


---------- ------- ------ -------- ------- ------------------------------

HPE NonStop SeeView Manual Page 256 of 365


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.TELE
SEEDIT1 ~ 1,132 $Z279 0/100 60,15 $SYSTEM.SYSTEM.SEEDIT
SEEDIT2 ~ 1,141 $Z280 120/200 60,15 $SYSTEM.SYSTEM.SEEDIT
* 1,128 $Z269 257.61 \CHICAGO.$SYSTEM.SYSTEM.Seeview
--------------------------------------------------------------------------
Tasks: 24/512 Cache:1971/16384 Cachefile: $mm (extensible)
Symbols: 56/512 Procs: 60/512 Pooluse: 0/24 (187/187)
Sysmsgs: 11387 Umsgs: 6783 Started: 2/9/95 10:26 AM
User : CENTDIV.MIKE 66,1 Current: 2/9/95 4:40 PM
--------------------------------------------------------------------------

Taskid The symbolic taskid name of a program or menu.


Cpu,Pin The processor number and process identification number of the
program associated with the taskid. If taskid was declared using a
?MENU directive, this field is tagged as menudata. The tilde (~)
indicates that the task is currently prompting. T indicates that
SeeView is posing as a device type 6,0 conversational terminal
for that task.
Name The identification name of the process.
CachePg A pair of numbers indicating cache utilization as a fraction (for
example, 9/16). The first number is the number of cache pages
currently used. The second number is the number of cache pages
allocated for taskid.
Timeout The value of the NODATATIMEOUT and DATATIMEOUT
settings for the task. (For additional information, see
TASK255.)
The row with an asterisk (*) in the Taskid column displays data about the currently
executing SeeView program. In this case, the Timeout column indicates the total
number of CPU seconds that SeeView has used since it was started.

STOP
The STOP statement stops a specified SeeView process.

STOP [ taskid-exp ]
[ \node. ] [ $name ] [ ! ]
[ \node. ] [ cpu,pin ] [ ! ]

HPE NonStop SeeView Manual Page 257 of 365


taskid-exp
specifies an integer expression that indicates the taskid number of the process
to be stopped. The
TASK declaration remains in effect as long as SeeView 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.

cpu, pin
specifies the processor number and process identification number of the program
to be stopped.

!
causes SeeView to stop non-SeeView tasks if SeeView has proper security access
to those tasks.

Example
This example shows the STOP statement.

STOP edit;
STOP 1,113;
STOP \chicago.$Z123; STATUS

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.

TASK taskid [:= object-name ] [ startup-string-exp ]


[:= string-exp ] [ ALLOWERROR ]

HPE NonStop SeeView Manual Page 258 of 365


[ BLOCKEDIO ON | OFF ]
[ CACHEPAGES pages ]
[ COPY copy-taskid ]
[ CPU cpu-number ]
[ DEVTYPE PROCESS | TERMINAL ]
[ FORMATDATA format-strg-rules]
[ HIGHPIN ON | OFF ]
[ IN filename ]
[ LIB library-filename ]
[ NAME process-name ]
[ ONMYVOL ]
[ ONOBJVOL ]
[ PRIORITY process-priority ]
[ QUEUE ON | OFF ]
[ SORTED [ "["start[:end]"]"] ]
[ STARTUP string-exp ]
[ SWAP swap-filename ]
[ TIMEOUT nodata-sec, data-sec]
[ VOLUME subvol | str-exp ]

taskid
identifies a symbolic task name to be associated with a program defined to the
SeeView program.
For task variable names, you can use any combination of alphanumeric characters
up to 15 characters in length, but the eighth character cannot be numeric.
If you do not specify a previously declared taskid or an object assignment
(:=object-name), SeeView attempts to start a program with the taskid name
on the $SYSTEM.SYSTEM subvolume. Once the program is declared, subsequent
references to the program name are actually references to its taskid. For
example, TASK TACL starts a TACL process on $SYSTEM.SYSTEM if TACL is an
unknown taskid. However, if TACL has been previously declared with TASK
TACL:= $vol.subvol.object, the TASK TACL statement reasserts a process
that has a symbolic taskid name of TACL but whose object file name is
$vol.subvol.object.

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. Subsequent execution of
the same TASK statement does not result in process creation if that process is still

HPE NonStop SeeView Manual Page 259 of 365


running. This provides efficient sharing and reusing of processes in multiple
contexts within the SeeView environment.
If object-name specifies a process ID, the TASK statement declares a taskid for
that process name without attempting to start anything. The taskid can then be
used as an external subdevice socket into the SeeView program. If an external
process opens the SeeView program and its process name matches the process
ID declared for the taskid, that process gains access to the SeeView program
through that taskid.
If object-name is not specified and the taskid has not been previously declared,
the taskid name is assumed to be an object file on the $SYSTEM.SYSTEM
subvolume.
When you specify object, you can use filename format. For example:
TASK X := $DATA.MM.X
Or you can use a string expression. For example:
TASK X := #s or TASK X := "$DATA.MYSUB." & #s.

startup-string-exp
specifies the startup message to be written to the process started by this TASK
statement. You can specify the startup message as: TASK FUP “INFO *”or as
TASK FUP STARTUP “INFO *”.

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. The #TASKPROC intrinsic
indicates whether NEWPROCESS or PROCESS_CREATE_ was used in the
attempt to declare the task. For example:
RUN FUP ALLOWERROR;
IF #TASKPROC = "PROCESS_CREATE_" THEN BEGIN
IF #TASKERRORTYPE=1 AND #TASKERROR=11 THEN BEGIN
MSG "File not present";
END;
END;
IF #TASKPROC = "NEWPROCESS" THEN BEGIN
IF #TASKERRORTYPE=3 AND #TASKERROR=11 THEN BEGIN
MSG "File not present";
END;
END;

HPE NonStop SeeView Manual Page 260 of 365


BLOCKEDIO ON | OFF
indicates whether an interprocess communication message received from taskid
can contain multiple logical messages delimited by carriage-return [line-
feed] characters.
BLOCKEDIO ON indicates that each interprocess message from taskid is
parsed into multiple logical messages if that IPC has text containing carriage-
return [line-feed] characters.
BLOCKEDIO OFF is the default unless the name of the object file is NETACL.
The BLOCKEDIO task property is passed on to peer tasks. This feature enables
general read receive task I/O to pass the BLOCKED I/O property on to any peer
tasks when READ PEEROK statements are used.
This feature allows you to write Server Mode scripts that provide generalized
support of blocked I/O.

CACHEPAGES pages
defines the number of cache memory pages to be allocated to this task. Cache
memory is used to store messages from the specified taskid.
CACHEPAGES takes effect only the first time you declare a taskid. Once declared,
it cannot be changed.

COPY copy-taskid
causes all messages received by the current task to also be copied to the CACHE
associated with the copy-taskid. The copy mechanism is enabled until a prompt
is received from the task referenced in the TASK statement.
One use of this mechanism is to allow the SeeView program to dynamically load a
displayed menu with the response from a process. (See Examples on page
263263.)

CPU cpu-number
indicates the processor number for the program to be created in. CPU 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
CPU assignments indicated by $CMON.

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.

HPE NonStop SeeView Manual Page 261 of 365


This option lets you specify the device type that the SeeView program returns to
DEVICEINFO calls. For example, TASK FUP DEVTYPE TERMINAL causes the
SeeView program to return device type 6,0 (terminal) to FUP DEVICEINFO calls.
TASK FUP DEVTYPE PROCESS causes the SeeView program to return device
type 0,0 (process) to the FUP task.
The DEVTYPE option works only when subtype 30 is set for the SeeView object
file. You can set it with this BIND command:
CHANGE SUBTYPE 30 IN SEEVIEW.

PROCESS
indicates that the SeeView program replies to DEVICEINFO messages from
the declared task with a device type 0,0.

TERMINAL
indicates that the SeeView program replies to DEVICEINFO messages from
the declared task with a device type 6,0. The procedure DEBUGPROCESS
requires that the TERMINAL device type for the file where the debug prompt is
to appear. Before you use the TACL DEBUG command, check that the device
type returned to TACL by the SeeView program is a TERMINAL. To do so at
any time, enter this SeeView statement and press Shift-Return:
TASK TACL DEVTYPE TERM

FORMATDATA format-strg-rules
specifies a string expression that causes the SeeView program to automatically
reformat each message received from the specified taskid. The format-strg-
rules string expression is any valid string expression containing #TASKDATA
string intrinsic references. To reformat selected data from each message, specify
the desired fields in the format-strg-rules expression.
For example, to format FUP INFO output automatically so that each line of output
is preceded with “[ ]” and terminated with a prompt production symbol “<==?”:
TASK FUP FORMAT "'[ ]' & #TASKDATA & '<==?'";
WRITE FUP,"INFO *";
WINDOW FUP MENU "CALL DoOp(#MENUINPUT");
Thus you can reformat the output so that each line contains an input field and is
defined as a prompt production.
FORMATDATA “” disables the format option.

HPE NonStop SeeView Manual Page 262 of 365


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.
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_.
OFF implies TASK, RUN, OPEN statements should attempt to launch low PIN
processes. When this option is off, processes are started using the Guardian
procedure NEWPROCESS.
The intrinsic #TASKPROC returns the name of the Guardian procedure used to
create the process. This intrinsic is useful as an aid to interpreting error codes
returned by the intrinsics #TASKERRORTYPE and #TASKERROR. The values
returned depend on which procedure was used to launch the process. For
information on error codes returned by the procedures PROCESS_CREATE_ and
NEWPROCESS, see the Guardian Procedure Calls Reference Manual.

IN filename
specifies the input file.

LIB library-filename
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 process name assigned to the newly created process.

ONMYVOL
indicates that the program object file name specified in the TASK object-name
is expected to exist on the current default SeeView volume and subvolume. You
can alter the default SeeView volume with the ALTER VOLUME statement. To
programmatically determine this volume, use the #VOLSUB string intrinsic.

ONOBJVOL
indicates that the program object file name specified in the TASK object-name
is expected to exist on the same volume and subvolume as the current SeeView
program object file. To programmatically determine this volume, use the
#VOLSUBOBJECT string intrinsic.

HPE NonStop SeeView Manual Page 263 of 365


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.
QUEUE ON indicates that the SeeView program does not automatically reply to
any messages, including simple writes, from the specified task.
QUEUE OFF indicates that the SeeView program automatically replies to any
simple write messages from the task. QUEUE OFF is the default.
Typically, the only time you need to specify QUEUE ON is to assert programmatic
synchronization in a script that performs complex interleaving of
WRITE and READ statements between multiple processes. Communication
synchronization in a script for a single process is always ensured unless WRITE
and READ statements are interleaved with one of more
WAIT statements.

SORTED [ "["start [:end ] "]" ]


indicates that cache elements contained in the cache associated with taskid are
to be sorted in ascending order.
The statement TASK taskid SORTED turns on sorting of cache records. A task
statement assertion with no SORTED specification disables the sort property for
the cache associated with taskid.
SORTED can be toggled on or off for a given cache that already contains queued
data. This does not cause the order of queued elements in that cache to be
changed. However, subsequent insertions appear in sorted order (or unsorted
order if toggled off). To avoid confusion, always clear a cache with the DELETE
statement whenever SORTED is toggled on or off except in advanced
programming situations.
When you specify SORTED without a start or end character index specification,
cache elements are sorted based on their entire length.

start
indicates the starting character index in each cache element where sort
comparisons between cache elements are to occur. A valid start value is
from 1 through 132. When you specify start without end, only that one start

HPE NonStop SeeView Manual Page 264 of 365


character position is used as a basis for sort comparison. For example,
SORTED[5] sorts records based only on the fifth character position in each
cache record.

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.

SWAP swap-filename
specifies the name of the file used for the page swapping of a process‟s virtual
user data space.

TIMEOUT nodata-sec , data-sec


specifies the number of seconds that a SeeView script is to wait for data from the
task.

nodata-sec
specifies the number of seconds that a WINDOW, READ, or
WRITE statement is to wait for initial communication from the task.

data-sec
specifies the number of seconds that a WINDOW statement is to wait for
subsequent messages from the task. (See also the ALTER
NODATATIMEOUT and ALTER DATATIMEOUT statements.)

VOLUME subvol | str-exp


specifies the default volume and subvolume for the task being declared. VOLUME
has meaning only when you are creating the program associated with the taskid.
You can literally specify the volume and subvolume, for example:
VOL $DATA.MYSUBVOL
or you can use a string expression, such as:
VOL #mysubvol

HPE NonStop SeeView Manual Page 265 of 365


Considerations

 $CMON Interface: The SeeView program sends a standard $CMON


ProcessCreation^Message to a user-specified $CMON process whenever a
$CMON process exists. (See the Guardian Programmer’s Guide for
documentation regarding this interface). Thus you can write a $CMON to control
as well as limit the number of tasks that the SeeView program creates.
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. Opening the display device at takeover is the
mechanism used by TACL.

Examples
The following example demonstrates the TASK statement.

TASK fup;
TASK discs := pup STARTUP "listdev disc";
TASK e := enform VOLUME $system.public;

The following example displays how the TASK … COPY statement works.

?MENU InfoMenu CACHEPAGES 32 { will contain fileinfo

?PROC ShowFileInfo ( #subvol )


{----------------------------}
{ Proc immediately pops up a menu on file info.
{ Note there is no wait for process response from fup.
{-----------------------------------------------------}
PARM #subvol; { Subvol to do fileinfo.
DELETE InfoMenu!; { Clear InfoMenu cache.
TASK fup; { Assert fup process.
WRITE fup,"info " { Start fup info operation
& #volsub & ".*"; { on specified subvolume.
WITH fup;
DO BEGIN { skip output until file
READ fup; { info starts to appear.
END UNTIL #TASKPROMPTING or (#TAKE #TASKDATA)="$";

TASK fup COPY InfoMenu; { Start copy to InfoMenu


BELOW; { Position below callers menu
WINDOW InfoMenu { PopUp menu without waiting
MENU "CALL InfoDetail('" & #subvol & "', #TAKE #MENUTEXT)"
SIZE 13,24;
?PROC InfoDetail ( #subvol, #file )
{---------------------------------}

HPE NonStop SeeView Manual Page 266 of 365


{ Show Fup INFO #file, DETAIL beside callers menu
{------------------------------------------------}
PARM #subvol { subvol of file
,#file { file to do info on
;
TASK fup; { Assert Fup taskid
BESIDE; { popup window beside.
WRITE fup,"info " & #subvol & "." & #file & ",detail";
WINDOW fup CACHE LASTLINE NOFRAME NOCURSOR;

?SECT main
{---------}
LINE 4; { Show info on line 4 of pg 1.
CALL ShowFileInfo(#VOLSUB); { Note #VOLSUB is an intrinsic

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 TO " "; { translate null .. us TO space
TRANSLATE 14 TO 14; { allow shift-out to passthru
TRANSLATE 15 TO 15; { allow shift-in to passthru
TRANSLATE 27 TO 27; { allow escape to passthru

char
specifies either a string expression or a decimal integer. For example:
TRANSLATE "abc" to "ABC"
The equivalent is:
TRANSLATE 97..99 TO 65..67;.

Considerations
The TRANSLATE statement applies to all information to be stored in cache. It applies
to all subsequently received data from user tasks and also to data input via the window
editor. This statement has some other usages. This example causes all lowercase text
received in cache to be put in uppercase:
TRANSLATE "a" .. "z" TO "A" .. "Z";

HPE NonStop SeeView Manual Page 267 of 365


It also causes any lowercase characters entered via the window editor to be put in
uppercase in cache.

UP
The UP statement moves the buffer address up relative to the current buffer address.
UP and U are synonyms that you can interchange.

UP | U [: expression [: char ] ]

expression
allows 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. 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 "#".

VARIABLE
The VARIABLE statement declares string and integer variables. The VARIABLE
statement and the DECLARE statements are equivalent.

VARIABLE variable [:= initialization-exp ] [, variable ... ]

variable
specifies the symbolic variable name of a string or integer variable. If you prefix
variable with a pound sign (#), it represents a string variable. Otherwise, it
represents an integer variable. String variables can contain up to 132 characters

HPE NonStop SeeView Manual Page 268 of 365


and have an implicit length associated with them. Integer variables represent 16-bit
signed integers.
A variable name can be any combination of alphanumeric characters up to sixteen
characters in length. Variables can be initialized when declared and can reference
intrinsics or other previously declared variables.
The scope of string and integer variables is global when declared in a ? SECTION
and local when declared in a ?PROCEDURE.

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+x/60),
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.
String variables declared with no initialization-exp have an initial value
equal to the null string “”. Integer variables declared with no initialization-
exp have an initial value equal to minus one (-1).

Example
This example shows the VARIABLE statement using multiple variables.

VAR x := 15
, y := x*2
,#s := "x= " & x & ", y= " & y { x= 15, y= 30
,#t := #s[1:5] { x= 15
,#z := #TAKE #s { X
;

VIDEO
The VIDEO statement defines video attributes beginning with the current buffer
address. Each option identifies a T6500 terminal video attribute.

VIDEO [ ( BLANK ) ] | "[" video-exp "]"


[ ( BLINK ) ]
[ ( DIM ) ]
[ ( REVERSE ) ]
[ ( UNDERLINE ) ]
[ () ]

HPE NonStop SeeView Manual Page 269 of 365


BLANK
specifies the blank video attribute for the screen area starting at the current buffer
address.

BLINK
specifies the blinking video attribute for the screen area starting at the current
buffer address.

DIM
specifies the dim video attribute for the screen area starting at the current buffer
address.

REVERSE
specifies the reverse video attribute for the screen area starting at the current
buffer address.

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).
Video attribute bit values are:
[ 1] dim
[ 2] blink
[ 4] reverse
[ 8] blank
[ 16] underline
You can use the video-exp option with the #FVBODY or #FVMENUBODY
intrinsics to set video attributes at the current buffer address to match the attributes
defined by the FRAMEVIDEO statement.

Considerations

 You can use video attributes alone or in combination with other video attributes,
such as, VIDEO (REVERSE) or VIDEO (REVERSE DIM).

HPE NonStop SeeView Manual Page 270 of 365


 Use VIDEO ( ) to set the video attributes of the current buffer address to normal
video.

Example
This example shows how you can use the VIDEO statement.

{draw a checkerboard
CLEAR; LINE 1;
FOR 20 DO BEGIN
FOR 6 DO BEGIN
VIDEO(REVERSE DIM); RIGHT:8; VIDEO(); LEFT:8
DOWN;
END;
RIGHT:8;
END;

WAIT
The WAIT statement temporarily suspends operation of the SeeView interpreter for a
specified period while interpreting a SeeView script.

WAIT expression-seconds [ , REFRESH ]

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.

 WAIT 0, REFRESH refreshes the screen immediately if cache is out of sync with
the current state of any window on the current terminal page. This provides a
simple way from within a script to have SeeView automatically and instantaneously
update all windows on the current page.

 WAIT 5, REFRESH automatically refreshes all the windows on the current page
and then suspends execution of the SeeView interpreter for five seconds. If you

HPE NonStop SeeView Manual Page 271 of 365


want to refresh all windows on the current page but not wait, use WAIT 0,
REFRESH.

Example
The MonitorPages procedure in this example shows the WAIT statement.

?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.oprlog"
;
VAR #list:= #nodelist { temp sys name list
,#sys := #trim #list { current system name
,#z { execute string variable
,#tasklist { list of started tasks
, nodes:=0 { number of nodes in list
;
WHILE #sys<>"" DO BEGIN { Build TASK <sys> for each
{ Build TASK <sys> := seedit ALLOWERROR
#z := "TASK "&#sys&":= seedit ALLOWERROR";
EXECUTE #z;
IF #TASKERROR THEN BEGIN { Can't monitor, show error
MSG(r) "Cannot Monitor \" & #sys &
" (" & #taskerrortype &"," & #taskerror &")";
FLUSH;
END ELSE
BEGIN { Task running, add to list,
nodes := nodes +1; { send it MONITOR command.
#tasklist := #tasklist & " " & #sys;
EXECUTE "with " & #sys;
IF NOT (#TASKSTART OR #TASKPROMPTING) THEN BEGIN
BREAK #TASKID; { Send task a break, and
WRITE #TASKID,""; { wait for break to take,
END; { then write command.
WRITE #TASKID,"MONITOR \" &#sys& "." & #logname;
END;
#sys := #TRIM #list; { get next sys name
END;
IF nodes<=0 THEN RETURN; { nothing to monitor

LINE 1; { line 1 of current page


#list:= #tasklist; { list of live monitors
FOR NODES DO BEGIN { build window on each sys
#sys := #TRIM #list; { in #list of systems
#z := "WITH " & #sys; { get with #sys
EXECUTE #z;
WINDOW #TASKID { build window on #sys
SIZE 80,24/nodes
EOFONLY CACHE LASTPAGE NOFRAME;
DOWN:24/nodes;
END;

HPE NonStop SeeView Manual Page 272 of 365


WHILE
The WHILE statement performs iteration.

WHILE expression DO statement;

expression
specifies a logical or integer expression to be evaluated before each iteration to
determine whether statement is executed. The statement is executed if the
expression has a nonzero value. expression can be either a logical expression,
(A>B AND #s="YES"), or an integer expression, such as (i+1-x).

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.

?MENU Nodes
?PROC ShowNodeNames
{------------------}
{ Display menu of network node names
{-----------------------------------}
VAR #s { output from netmon
,#sysno { system number
, i { system name column index
;
TASK netmon;
WRITE netmon,"cpus";
DELETE nodes!;
WITH netmon;

WHILE (NOT #TASKPROMPTING) DO BEGIN


READ netmon,#s;
#sysno := #TAKE #s;
IF #NUMERIC #sysno THEN BEGIN { have sysno
SCAN #s until "\" ->i;
IF i THEN BEGIN { have sysname
PUSH #s[i+1:132] ONTO nodes;
END;
END;
END;
LINE 4;
WINDOW nodes MENU "CALL ShowPaths(#TAKE #MENUTEXT)"

HPE NonStop SeeView Manual Page 273 of 365


SIZE 12,24 PAGES;
?PROC ShowPaths( #sys )
{---------------------}
{ Show PATHS for #sys
{---------------------}
PARM #sys; { #sys name w/o \
TASK netmon;
BESIDE;
WINDOW netmon,"paths \" & #sys
CACHE LASTLINE NOFRAME NOCURSOR;

?SECT main
{---------}

CALL ShowNodeNames;

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 in this subsection.) Default window frame
attributes are GLASS, OPEN, and SILL. GLASS protects the window text area unless
it is edit mode. OPEN enables you to access the window object by moving the cursor
to some part of the window, entering text, and pressing Return. SILL provides an input
area at the base of the window.

WINDOW { * | "[]" | task-exp } [ , string-exp ]


[ BLANKSILL ]
[ CACHE [ FIRSTPAGE ] ]
[ LASTPAGE ]
[ LASTLINE | LL ]
[ INDEX index ]
[ + | - ] target ]
[ CLEAROVER | NOCLEAR ]
[ CURSOR | NOCURSOR ]
[ EDIT | NOEDIT ]
[ EOFONLY ]
[ EOFSEEK ]
[ FIELDS [(attribute-keywords) | "["video,field"]" ]]
[ FOOT string-exp ]
[ FOR linecount-exp | * ]
[ FRAME | NOFRAME ]
[ GLASS | NOGLASS ]
[ HEADING heading-string-exp ]
[ INPUT | NOINPUT ]
[ KEYS [ BODY | SILL | BODYSILL ] fkey-list ]
[ SAME | OFF ]
[ MENU [ default-production ] [, shift-production ] ]

HPE NonStop SeeView Manual Page 274 of 365


[ OFFSET X-offset-exp, Y-offset-exp ]
[ OPEN | CLOSED ]
[ PAGES | NOPAGES ]
[ PRODUCTION [default-production][,shift-production]]
[ PROTECT | NOPROTECT ]
[ SILL | NOSILL ]
[ SIZE width-exp [, height-exp ] |* ]
[ UNTIL target ]

*
specifies that a free, unassigned window is built. You can use a free window to
communicate directly with the SeeView interpreter.

[ ]
builds a window on the most recently user-referenced taskid. This taskid is the
taskid of the window that last invoked a script production. This lets you use
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. For example, a program might generate a line of output in a
menu to contain:
HELP <== WINDOW [],"HELP ALL" NOFRAME
When the user selects this menu line, the program associated with the menu
receives the command HELP ALL and displays the results of that command in the
same window.
In a similar manner, other text output by a program can have productions
associated with the objects that it displays. For example:
Cpu 0 <== WINDOW [],"CPU 0,DETAIL" NOFRAME

task-exp
specifies an integer expression indicating the taskid number of the task whose
data is to be displayed in the window.

string-exp
causes the window to contain the results of the
TASK command represented by the string expression, string-exp.

HPE NonStop SeeView Manual Page 275 of 365


BLANKSILL
specifies that sill input is invisible. To toggle BLANKSILL on and off directly from a
window, enter tilde (~) and press Return.

CACHE
specifies that the window is displayed with previously cached messages rather
than waiting for real-time task interprocess communication.

FIRSTPAGE
displays the first page of messages in cache (default).

LASTPAGE
displays the last page of messages in cache.

LASTLINE | LL
displays the last line of text in cache.

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. The search
is bidirectional: + specifies searching forward, and - specifies searching
backward through the cache for the target text.
target can be either text between delimiters, such as /this is the target/, or a
string variable, such as [ + | ]#string-var.
If you specify MENU before the cache option, the search is restricted to the
text to the left of the production symbol. If you do not specify MENU or you
specify it after the cache option, the search includes all characters in the
cache.

HPE NonStop SeeView Manual Page 276 of 365


CLEAROVER
specifies that any edit-mode windows overlapped by this window are deleted and
cleared from the screen. As always, the program and program context associated
with a deleted window are not affected by the deletion of the windows. Not
specifying either this option or the NOCLEAR option causes windows other than
edit mode to be automatically deleted.

NOCLEAR
implies that the WINDOW statement fails with a run-time error if this window
overlaps other windows. Not specifying either this option or the CLEAROVER
option causes windows other than edit mode to be automatically deleted.

CURSOR
specifies whether the cursor is moved to this window.
The default is CURSOR, which means that the cursor is moved to the current
window.

NOCURSOR
prevents cursor repositioning.

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.
To place windows that are not menus in edit mode, press F5 or F6 from their sill.

EOFONLY
pages directly to the last page of window cache. You can toggle the EOFSEEK
and EOFONLY attributes on and off with the DEL-LINE key on the right side of the
keyboard.

EOFSEEK
causes a window to dynamically seek the last page of messages in cache by
refreshing the display with the most recent messages every REFRESH seconds

HPE NonStop SeeView Manual Page 277 of 365


when REFRESH is active. (See the REFRESH option of the ALTER statement). If
directed to other than the last page of text, the window text dynamically seeks its
way back to the end of cache (EOF).
The EOFSEEK option pages through the window cache from the current page
location in cache to find the end of cache.

FIELDS [ (attribute-keywords ) | "["video,field"]" ]


indicates that window text containing left “[” and right “]” square brackets is
automatically reformatted to data entry input fields. Thus, the window behaves as a
data entry input panel.
You can specify both default and individual field attributes. This option defaults to
NOPAGES (see the NOPAGES option in this subsection280) for nonmenu
windows.
You can optionally specify default attributes with a list of attribute keywords
enclosed in parentheses or with video and field values enclosed in square
brackets.
For example:

WINDOW .. FIELD (REVERSE DIM NUMERIC); { is equivalent to


WINDOW .. FIELD [ myVid, myFld ];

VAR myVid:=5, myFld:=4; { Where 5=> reverse dim, 4=> numeric.

Field video attributes are:

DIM | D Field is dimmed. [ 1,


BLINK | B Field is blinking. [ 2,
REVERSE | R Field is reversed. [ 4,
BLANK Field is invisible. [ 8,
UNDERLINE | U Field is underlined. [16,
NORMAL | NORM Field is normal video. [ 0,

Field domain attributes are:

FREE | F Field is any characters. same as f() , 0]


ALPHA | A Field is only alphabetic characters , 2]
ALPHASP | AS Field is alphabetic and space characters ,12]
ALPHANUM | AN Field is only alphabetic and numeric , 6]
ALPHANUMSP | ANS Field is alphabetic, numeric, and spaces ,14]
NUMERIC | N Field is only numeric 0 .. 9 , 4]
NUMFULL | NF Field is full numeric 0 .. 9 .,+-$ , 8]
NUMFULLSP | NFS Field is full numeric including spaces ,10]
NOTAB | NOT Cursor will not auto tab at end of field ,16]
PROTECTED | P Field is protected (display only) ,32]

To specify individual attributes, append field attribute production definitions at the


end of a cache line. Definitions appear after the attribute production (::) symbol.
(See the next example.)

HPE NonStop SeeView Manual Page 278 of 365


To specify initial values for fields, either place the value directly in the field, or
place the name of a variable in the field. For example:

CITY [CHICAGO ] { is equivalent to


VAR #city := "CHICAGO"; { placing a variable
CITY [#city ] { into a field

The FIELDS option in conjunction with the script development facility on the Help
page provides a what-you-see-is-what-you-get (WYSIWYG) screen builder
capability that allows instantaneous prototyping.
For example:

?MENU Employee
{-------------}
{ The following defines an Employee panel. Note:
{ 1) [ ] defines input fields
{ 2) :: defines corresponding video and field attributes
{-------------------------------------------------------}
First [ ] Last [ ] :: (alpha) (alpha)
Street[ ]
City [ ] State[ ] Zip[ ] :: (a) (a) (n)
Phone [ ] Home [ ] :: (n) (n blank)
*
?PROC ShowEmp
{------------}
WINDOW Employee FIELDS (reverse dim) { default reverse dim
MENU "CALL AcceptEmp"
CACHE FIRST UNTIL "*" SIZE 20
KEYS F5, F6, F7
HEAD "Add-F5 Delete-F6 List-F7";
?PROC AcceptEmp
{--------------}
LINE #MENULINE,#MENUCOL;
VARIABLE #first, #last, #addr, #city, #st, #zip, #office, #home;
ACCEPT #first, #last, #addr, #city, #st, #zip, #office, #home;
IF #FKEY=5 THEN CALL AddEmp;
IF #FKEY=6 THEN CALL DeleteEmp;
IF #FKEY=7 THEN CALL ListEmp;

FOOT string-exp
specifies text that appears on the sill of a window. When you specify FOOT with a
window that has a sill, the cursor is automatically positioned at the end of the foot
text string.

FOR linecount-exp | *
specifies the width and height of the window. One purpose of this option is to size
popup menus. The FOR option sets the height of the window to linecount-exp.
The width of the window is set to #MENUWIDTH, which is the width of the last
menu referenced with the Return key. You can use the SIZE option to specify
another width.

HPE NonStop SeeView Manual Page 279 of 365


linecount-exp
specifies the height of the body portion of the window, not including the
heading and foot portions. It is the same as SIZE #MENUWIDTH,
linecount-exp + 2.
For example, the following menu production for DeviceTypes causes a menu 8
lines high to pop up below the DeviceTypes menu text. The first item in this
popup is DISC.
DeviceTypes <==BELOW; WINDOW[] MENU CACHE/DISC/ FOR 8;
DISC .. <==BESIDE;WINDOW pup,"LISTDEV DISC";

*
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.
For example:
WINDOW FUP,"INFO *" NOFRAME CACHE LASTLINE;

GLASS | NOGLASS
specifies whether the main body area of the window is protected from cursor
access (GLASS) or not protected (NOGLASS). You can also use the insert free
cursor on or off function key (SF5) to control cursor access to the main area of the
window.

HEADING heading-string-exp
specifies the heading to appear at the top of the window. If you do not specify a
heading, and the window has a taskid associated with it, the SeeView program
automatically displays that taskid name in the heading of the window.

INPUT | NOINPUT
indicates whether a user can input commands to the window.
INPUT permits commands to be input (default).

HPE NonStop SeeView Manual Page 280 of 365


NOINPUT does not allow command input.
A window with NOSILL and GLASS does not allow any access.

KEYS [ BODY | SILL | BODYSILL ] fkey-list


[ SAME | OFF ]
associates a list of function keys with a window. These keys cause the production
associated with this window to be executed.
Use the PRODUCTION or MENU window options to associate productions with a
window. To specify which function keys invoke the production associated with a
window, use the KEYS option. The invoked script can then use the #FKEY...
intrinsics to provide user-defined function key operations.
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.

?SECT PsmailWindow
TASK psmail;
WINDOW psmail HEAD "F6-Delete F9-Print"
KEYS F6, F9
PRODUCTION "CALL MailProc";
?PROC MailProc
VAR #cmd;
IF #FKEY= 6 THEN #cmd := "DELETE " & #take #menutext;
IF #FKEY= 9 THEN #cmd := "PRINT " & #take #menutext;
LINE #MENULINE,#MENUCOL;
WINDOW psmail,#cmd CACHE LASTLINE NOFRAME;

[ BODY | SILL | BODYSILL ]


indicates whether the function keys specified in fkey-list apply when the
cursor is in the BODY or SILL area of the window. BODYSILL indicates that
fkey-list applies to both areas of the window. BODY is the default. You can
specify separate lists by using the KEYS option twice. For example:
WINDOW .. KEYS BODY F5,F6,F7 KEYS SILL F13,F14

fkey-list
refers to a comma-separated list of any of these keywords:

--- Unshifted --- --- Shifted ---


F1 .. F16 SF1 .. SF16
RETURNKEY SRETURN
INSERTLINE DELETELINE
NEXTPAGE PREVPAGE SNEXTPAGE SPREVPAGE
ROLLUP ROLLDOWN SROLLUP SROLLDOWN

HPE NonStop SeeView Manual Page 281 of 365


You can also specify the fkey-list by using one or more string variables
containing the comma-separated function key names. The string variable can
also contain the BODY, SILL, BODYSILL, SAME, OFF options. For example:

VARIABLE #mykeys:=
"SILL F5, F6, F7".
WINDOW .. KEYS #mykeys;

SAME
specifies that the function key list for this window should be the same as the
list associated with the window that caused a script to be invoked. Use SAME
when you want your script to create or reassert a window with the same fkey-
list as the previously invoked menu or window.

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. Menu windows have special features, including simple point-and-press-
Return execution of SeeView statements that are logically associated with the
menu cache line items of a menu window. You can associate SeeView statements
with menu cache lines in several ways.
First, you can associate a specific production with a given cache line. To do so,
place a production symbol (<==) at the end of a line of text that is to appear in a
menu. Follow the production symbol with one or more statements that handle the
menu item specifically, to be executed when the menu line item is selected.
Second, menu items that do not have a specific production symbol associated with
them execute the default production associated with the MENU if you defined a
default production for that menu. This lets you associate a single rule with all the
menu items in a window, such as:
MENU "CALL Handler"
Third, you can define a production for all items in a menu to be executed when a
menu item is selected with the Shift-Return key. This production is called a shift
production. It allows generalized context-sensitive HELP for menus, which is
implemented by pointing to a menu item and pressing Shift-Return. You can also
use shift productions to provide other secondary context-sensitive functions, such
as generalized menu maintenance.
MENU "CALL Handler" ,"CALL MenuMaint"

HPE NonStop SeeView Manual Page 282 of 365


default-production
specifies a string expression containing SeeView statements that are executed
if the designated menu line does not contain a specific production symbol
( <== ). The SeeView statements contained in the default production are
executed when the Return key is pressed or when any of the function keys in
the KEYS option fkey-list are pressed.

shift-production
specifies a string expression containing SeeView statements that are executed
when you select a menu item by pointing the cursor to the menu item and
pressing Shift-Return. Shift-Return causes the shift production to be executed.
Conceptually, Return is analogous to a mouse click and invokes the default
production. Shift-Return is analogous to a double-click and invokes the shift
production.

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. In this example, h is
the height of the window:
OFFSET 0,-h/2

OPEN
specifies that you can access the window object by moving the cursor to some part
of the window, entering text, and pressing Return.

CLOSED
indicates that the window is drawn only. Once displayed, its existence is unknown
to the SeeView program.

PAGES
lets you page and scroll the window text.

NOPAGES
prevents you from paging or scrolling a window‟s text. Use this option with the
MENU option to restrict features that might bother inexperienced users.

PRODUCTION [ default-production ] [ , shift-production ]


specifies the default production and shift production for a window. Use the KEYS
option to specify a list of keys that cause the default production to be executed.

HPE NonStop SeeView Manual Page 283 of 365


Specifying KEYS SRETURN causes the shift production to be executed when the
Shift-Return key is pressed.
The PRODUCTION option provides a way to specify productions for windows that
are not defined as a menu.

default-production
specifies a string expression containing SeeView statements that are executed
when you press any of the function keys in the KEYS option fkey-list when
the cursor is in the corresponding KEYS option BODY or SILL area of the
window. If the Return key is to invoke the default production, you must include
the Return key in the KEYS option specification. For example:
KEYS BODY RETURNKEY, F5, F6;.

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;.
Conceptually, Return and the KEYS option fkey-list is analogous to a mouse
click and invokes the default production. Shift-Return is analogous to a double-
click and invokes the shift production.

PROTECT
indicates that you cannot access the menu text with the cursor. This option is the
default for a window with a menu and protects text from being accessed by the
cursor.

NOPROTECT
lets you use the cursor to access menu text. This advanced feature allows the
cursor to access the menu text.

SILL
specifies that the window has a sill. A sill is an input area at the foot or base of the
window where you can enter commands and press Return to send them to the
object associated with the window.
Specify SILL for a menu window to allow the sill area to be used to input
commands to the task associated with the menu and the menu body area to be
used as a menu.

HPE NonStop SeeView Manual Page 284 of 365


For a menu with a sill, the SILL option takes precedence over any KEYS SILL
options. As a result, data is passed to the task associated with the menu, not to the
production associated with the menu.
SILL is the default for a window that is not a menu.

NOSILL
NOSILL indicates there should be no input area at the foot of the window. NOSILL
is the default for a menu window.

SIZE width-exp [, height-exp ] | *


specifies the size of the window in terms of characters wide and characters high.
You can also use the FOR and UNTIL options to specify the size of a 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. A
window with a height of three can display one line of text at a time. Three is the
minimum allowable value.

*
indicates window width and height as large as possible based on the location
of this window and any preexisting windows on the current page. This option
takes into account the location of other windows on the current page and sizes
this window so that it does not overlap these other windows.
If the value of the width or height expression exceeds the maximum logical size
possible, the window is automatically sized to the maximum possible size for the
window location.
If you specify WINDOW .. SIZE 1000,1000 for a window at a buffer address of
LINE 22,71; the actual size of the window is automatically sized to SIZE 10,3;
which is the maximum size possible for a window whose upper left corner is
located at line 22, column 71 of the screen.

UNTIL target
specifies the height of the window based on the actual contents of the window. The
height of the window is the number of lines from the CACHE target to the UNTIL

HPE NonStop SeeView Manual Page 285 of 365


target. The UNTIL option sets the width of the window to #MENUWIDTH, which
is the width of the last menu referenced with the Return key. You can use the SIZE
option to specify another width.

target
specifies either text between delimiters, such as /*/ or \stop here\, or a string
expression, such as #s.
If you specify MENU before the UNTIL option, the search is restricted to the text to
the left of the production symbol. If you do not specify MENU or specify it after the
CACHE option, the search includes all characters in the cache.
One use of this option is for sizing popup menus. For example:

DEVICETYPES<==WINDOW [] MENU CACHE /DISC/ UNTIL /*/


DISC <==BESIDE; WINDOW pup,"LISTDEV DISC";
TAPE <==BESIDE; WINDOW pup,"LISTDEV TAPE";
*

Examples
An example of the WINDOW statement follows.

TASK comint; { declare comint


WINDOW comint,"who"; { show results of WHO command in window

TASK oprlog:=seedit { declare seedit process as a logger


STARTUP "MONITOR OPRLOG";
WINDOW oprlog CACHE EOFSEEK; { Active window on last page of oprlog
WINDOW oprlog CACHE -/DOWN/; { or, on most recent DOWN message

TASK PUP; {4 windows displaying contiguous listdev


WRITE PUP,"LISTDEV";
FOR 4 DO BEGIN
WINDOW PUP SIZE 20,24; Right:20;
FLUSH;
END;

This example displays the window following it.

VAR w:=36, h:=7;


TASK fup;
WINDOW fup SIZE w,h;

HPE NonStop SeeView Manual Page 286 of 365


vst910

This example displays the window following it.

WINDOW fup,"INFO *" SIZE w,h;

vst911

This example displays the window following it.

WINDOW fup,"INFO *" CACHE LASTLINE SIZE w,h;

vst912

This example displays the window following it.

WINDOW fup CACHE FIRSTPAGE SIZE w,h;

vst913

This example displays the window following it.

WINDOW fup MENU CACHE /INFO */ OFFSET 0,3 SIZE w,h;

HPE NonStop SeeView Manual Page 287 of 365


vst914

This example displays the window following it.

WINDOW fup CACHE LASTPAGE SIZE w,h NOSILL;

vst915

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 #295.

Examples
These examples show the WITH statement.

?PROC TaskShow { TaskNumber }


{---------------------------}
PARM tasknumber;
WITH tasknumber;

HPE NonStop SeeView Manual Page 288 of 365


IF #TASKPAGENO THEN BEGIN { if window exists then display that page
PAGE #TASKPAGENO;
RETURN;
END;
PAGE 3; { otherwise build window on page 3
WINDOW TaskNumber;

?PROC ScrollWindow (tid,n)


{--------------------------------------}
PARM tid;{taskid of window to page
PARM n;{ "n" lines to scroll +/-
WITH tid;{ get "with" taskid
IF NOT #TASKPAGENO THEN RETURN;{no window on taskid

PAGE #TASKPAGENO;{goto window page


LINE #TASKLINE, #TASKCOL;{position window
WINDOW tid NOFRAME{scroll window "n" lines
SIZE #TASKWIDTH, #TASKHEIGHT
CACHE INDEX #TASKCACHELINE + n;

WRITE
The WRITE statement writes the specified string to a process or a cache.

WRITE taskid|* [PEEROK ] ,string [,reply-err ] [,error ]


[CACHE index [AFTER ]] [FROM task | * ]
[BEFORE] [CACHE index ]
[DELETE] [FOR lines ]
[UPDATE] [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. The WRITE statement automatically synchronizes
script execution to writereads (prompts) from the specified taskid. Any data
previously written or pending from the taskid process is automatically saved to
cache until a WRITEREAD is received from that taskid. When the WRITEREAD is
received, the specified string is written (or replied) to the process represented by
taskid.
For a description of the taskid declaration, see
TASK255.

HPE NonStop SeeView Manual Page 289 of 365


*
causes the WRITE statement to write to the SeeView message cache rather than
to the process specified with taskid.

PEEROK
specifies that the write is a blind write to any process that is a peer to the specified
taskid. Peer tasks are all tasks that have the same $SeeView-process-name
#taskid subdevice opened. Without this option, the SeeView program waits
specifically for a prompt from only the specified taskid.
Note. The script writer assumes the responsibility that use of the PEEROK option
causes a blind write to any peer task that is currently prompting.

string
specifies a string expression that indicates the string to be written to the
process, or cache, indicated by taskid.
The string can be any combination of concatenated quoted strings, integers, and
string variables. (See examples.)

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.)
-5 if the task has stopped.
-6 if the task has ended abnormally (abended).

CACHE index
stores the string in the cache associated with the taskid rather than actually writing
it to the task in real time. Specifying an asterisk (*) rather than taskid causes the
CACHE option to access the SeeView free window message cache rather than a
taskid cache.

HPE NonStop SeeView Manual Page 290 of 365


index
specifies the ordinal record index in the cache. 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.
The CACHE index options AFTER, BEFORE, DELETE, and UPDATE define
how the data is stored in cache. BEFORE is the default.

AFTER
indicates that the data defined by string is stored in the cache element
after the CACHE index.

BEFORE
indicates that the data defined by string is stored in the cache element
before the CACHE index.

DELETE
indicates that the element defined by CACHE index is deleted. In this
case, string has no effect, but must be supplied; for example “”.

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. This provides an efficient way to
return large amounts of information to SeeView requestor tasks.

task
represents a taskid expression whose cache is written to the task specified
by WRITE taskid.

*
indicates that the write should be from the free message cache.

HPE NonStop SeeView Manual Page 291 of 365


CACHE index
indicates the starting cache record index from which to start the write. If you do
not specify CACHE, the write begins with the first cache record, such as
CACHE 0.

index
specifies the 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.

FOR lines
indicates the number of cache records to write. If you do not specify FOR, as
many lines as possible are written. Use the LINESENT option to determine the
number of lines actually written.

DELIMIT string
indicates the string delimiter used to delimit the end of each line of cache text
in the blocked message. The default delimiter is a carriage return character,
DELIMIT #CHAR(13). To change it to any desired delimiter string, such as
carriage-return line-feed, specify DELIMIT #CHAR(13) & #CHAR(10).

COMPRESS
is reserved for future use.

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. The maximum
value cannot be larger than either the configured value of the startup PARAM
POOLPAGES or the WRITE taskid reply buffer size.

MORE string
indicates the string of flag characters to be placed at the start of the buffer if
the reply buffer is full. You can use this option to indicate to the requester that

HPE NonStop SeeView Manual Page 292 of 365


more data remains to be sent. For example, the response buffer from this
example starts off “All Done” if all of mycache is sent. Otherwise the response
buffer starts with “Not Done.”:

WRITE gui,"All Done" FROM mycache


MORE "Not Done";

When MORE string contains six pound or octomorph sign (######)


characters, these characters are used as a formatting mask. If more data
remains to be sent, the masked portion of the string contains the cache index
of the next cache element to be transferred. This option allows multiple
requesters to share a context-free SeeView server by passing the cache index
as part of the request.
For example, the response buffer from this script starts with the header string
“TACL status (complete buffer)” if all of the TACL cache was returned in the
single write.

DELETE tacl!; { Clear tacl cache


WRITE tacl,"status 0"; { Do status to tacl
WRITE tacl,""; { wait for response

WRITE gui, "TACL status (complete buffer)"


FROM tacl
MORE "TACL status (continue ######)";

Otherwise, the response buffer starts with a header string indicating that the
response continues at a given cache index; for example, “TACL status
(continue 000098)”, where 000098 indicates that the response continues at
TACL cache index 98.
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 HPE
conversational process that the SeeView server has been scripted to allow. This
capability has a variety of applications and advantages in the area of GUI
implementations on workstations. The third example depicts this.

Examples
These examples show the WRITE statement.

HPE NonStop SeeView Manual Page 293 of 365


 First example:
?PROC ListEmployees(FromEmpNo,ForCount)
{-------------------------------------}
PARM FromEmpNo { Employee number to start from
, ForCount { Number of employees to list
;
TASK enform VOLUME $system.public;
WRITE enform, "Open emp; set @heading off;";
WRITE enform, "Set @target-records " & ForCount & ";";
WRITE enform, "List emp.emp-num where emp.emp-num > " & FromEmpNo & ";";
WINDOW enform cache lastline;

 Second example:


?MENU scratch
?SECT main
{---------}
WRITE scratch CACHE i,#s; { Store #s prior to cache element "i"
WRITE scratch CACHE 0,#s; { Store #s at the beginning of cache
WRITE scratch CACHE -1 AFTER, #s; { Store #s at the end of cache
WRITE scratch CACHE i UPDATE,#s; { Update cache element "i" with #s
WRITE scratch CACHE i DELETE,""; { Delete cache element "i"

 Third example:


?PROC GuiServer ( #op, gui)
{-------------------------}
{ This proc performs the operation contained in
{ #op and replys the entire response to the requestor.
{----------------------------------------------------}
PARM #op { #op = <ci-name> <command>
, gui { taskid of gui requestor
;
VAR #ci := #TAKE #op { command interpreter name
,#cmd := #DROP #op { command to do
;
EXECUTE "TASK " & #ci; { declare requested ci
EXECUTE "WITH " & #ci; { get WITH ci taskid

DELETE #taskid !; { clear cache contents


WRITE #taskid,#cmd; { perform command
WRITE #taskid,""; { wait for response

WRITE gui,"" { reply with cache


FROM #taskid; { from requested ci

?SECT main
{---------}
{ This section loops processing $RECEIVE requests
{------------------------------------------------}
VAR #op; { Server Request
TASK gui := $xxx TIMEOUT 3600,3600; { Timeout in 1 hour

WHILE 1 DO BEGIN { Loop


READ gui PEEROK, #op; { read gui request

HPE NonStop SeeView Manual Page 294 of 365


CALL GuiServer ( #op, #TASKIDLASTREAD); { process request
END; {

WRITEREAD
The WRITEREAD statement writes a string to the SeeView terminal and returns the
read result in a string variable.

WRITEREAD [write-string ] , string-var [, error-var ]

write-string
specifies a string expression indicating the string that is written to the SeeView
terminal #TERMFILENAME. If you do not specify write-string, the
WRITEREAD operation becomes a simple terminal READ operation.

string-var
specifies a string variable to contain the terminal response from the write-
string.

error-var
specifies an integer variable name to contain the file-system error resulting from
the WRITEREAD operation.
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.

VAR #s
,#esc := #CHAR(27) { Define an escape %33 character}
,#GetRevision := #esc & "_"
{ PCT read full revision level}
;
WRITEREAD #GetRevision, #s; { #s = #C00T0C00}

HPE NonStop SeeView Manual Page 295 of 365


Parentheses ( )
The left and right parentheses specify operator precedence and also delimit
designational integer assignment expressions.

( expression::= number )
number operator expression
number operator (expression)

number ::= sign integer


sign integer variable
sign taskid variable
sign string constant
sign string variable
sign string expression

sign ::= null


+ -

operator ::= + - * / MOD AND OR := > < >= <= = <> >> << NOT

Considerations
A designational expression permits integer variable assignment within an expression.
Designational expressions are allowed anywhere expressions are permitted.
Operator type and precedence are as follows:
(boolean) (relational) (arithmetic) (shift)
:= AND OR NOT > < >= <= <> = + - * / MOD >> <<
0 1 1 2 2 2 2 2 2 2 3 3 4 4 4 5 5

Example
This example shows how to use parentheses to specify operator type and precedence.

VAR row:=0 { draw stairs


,col:=1
;
WHILE (row:=row+1) < 25 DO BEGIN
LINE row; VIDEO(REVERSE DIM);
LINE row,(col:=col+1);
VIDEO ();
END;

HPE NonStop SeeView Manual Page 296 of 365


Brackets [ ]
The left bracket delimits the start of a mixed string and expression list statement. A
right bracket ends the list.

[ string-or-expression-list ]

string-or-expression-list
specifies a comma-separated list of string and integer expressions that is output
directly to the terminal at the current buffer address. Thus VAR #s:=“Hello”; LINE
10; [#s]; outputs “Hello” at line 10 of the current terminal page.

Example
This example shows how to use the left bracket to delimit the start of a mixed string
and expression list.

VARIABLE esc:=27;
[esc,"o","This text on line25",esc/2]; {note esc/2=13 which is a <CR>

Left Brace {
The left brace delimits an end-of-line comment.

{ comment-text-to-end-of-line

Considerations
The delimited comment remains in effect until the end of the line.

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 <CR>

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.

" text " [ & string-expression ]

HPE NonStop SeeView Manual Page 297 of 365


Considerations
The specified string appears at the current buffer address. To change the buffer
address, use the LINE, BELOW, BESIDE, UP, DOWN, LEFT, RIGHT, and PLOT
statements. A balanced string expression can follow the quote. For an explanation of
string-expression syntax, see the description for the pound sign or octomorph
(#) in this section.
You can use a null literal string “” to delimit the start of a compound string-
expression (for example, “” & #TIME;).
A triple double quote results in a single double quote being inserted in the resultant
string. Because quotes within quotes are frequently desirable for default productions, a
single quote within a double quoted literal string also results in a single double quote.
Thus, these are equivalent:

#s := "CALL myproc('FUP','INFO')";
#s := "CALL myproc(" & """ & "FUP" & """ & "," & """ & "INFO" & """ & ")";

The result is a string that contains:


CALL myproc("FUP","INFO")
You can put a single quote in a string by using the #CHAR type conversion string
function. Thus, the following creates a string with a single quote.
"It" & #CHAR(39) & "s done like this" { It's done like this.

Example
This example shows how to use quotation mark script symbols.

VAR lineno := 0
, #s := "thistextgetsdropped ( Msg on line 25 )"
;
DO BEGIN
LINE lineno:=lineno+1;
"Line " & lineno;
END UNTIL lineno >= 24;
MSG #DROP #s; { Line25 = ( Msg on line 25 )

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.

HPE NonStop SeeView Manual Page 298 of 365


#string-variable := string-expression
string-expression ::= string-operand
string-operand & string-expression

string-operand ::= quoted-string


expression
string-variable [ index-range ]
string-operator

index-range ::= "[" beginchar [ : endchar ] "]"

string-operator ::= #ALPHA string-var [ index-range ]


#CHAR expression
#DEVICEINFO string-var [ index-range ]
#DOWNCASE string-var [ index-range ]
#DROP string-var [ index-range ]
#INFO string-var [ index-range ]
#NODE string-var [ index-range ]
#NUMERIC string-var [ index-range ]
#ORD string-var [ index-range ]
#PROC string-var [ index-range ]
#SIZE string-var [ index-range ]
#SPECIAL string-var [ index-range ]
#TAKE string-var [ index-range ]
#TASK string-var [ index-range ]
#TRIM string-var
#UPCASE string-var [ index-range ]

string-variable ::= # user-defined-symbol-name


string-intrinsic

string-intrinsic ::= #CACHEFREE


#CACHEPAGES
#CREATORUSERID
#CREATORUSERNAME
#DATE
#EXPIRES
#FIRMID
#FKEY
#FKEYCOL
#FKEYDELETELINE
#FKEYINSERTLINE
#FKEYLINE
#FKEYNEXTPAGE
#FKEYPREVPAGE
#FKEYRETURN
#FKEYROLLDOWN

HPE NonStop SeeView Manual Page 299 of 365


#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
#MYPROCESSNAME
#PAGE
#PAGESFREE
#PAGESUSED
#PRODNAME
#PRODNUM
#REVISION
#SERVERMODE
#SHELL
#SPACES
#TASKCACHEFILE
#TASKCACHEFREE
#TASKCACHELINE
#TASKCACHELINES
#TASKCACHEPAGES
#TASKCOL
#TASKCOUNT
#TASKCPU
#TASKDATA
#TASKEDITMODE
#TASKERROR

HPE NonStop SeeView Manual Page 300 of 365


#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
#TIMERSECS
#TIMETENSECONDS
#TOSVERSION
#USERID
#USERNAME
#VERSION
#VERSIONIPM
#VOLSUB
#VOLSUBINVOKE
#VOLSUBOBJECT

#string-variable
indicates the beginning of a string-replacement statement when it appears as the
first character of a SeeView statement. For example:

HPE NonStop SeeView Manual Page 301 of 365


#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. An attempt to use string
variable, intrinsic, or operator symbols without a preceding pound sign (#) results
in a syntax error. (Typing is enforced.)

&
specifies that strings are to be concatenated. & indicates string concatenation.

index-range
specifies that the string index range of [beginchar : endchar] returns
characters beginchar through endchar of a string variable or string intrinsic.
For convenience, when endchar is beyond the end of the current length of a
string, only the characters up to the end of the string are returned. Thus, if
#S:="12345678" then #S[6:132] returns "678" and is equivalent to
#S[ 6:#SIZE #S].

string-operator
works on string variables and string intrinsics. String operations either return
information or operate on the string variable or string intrinsic. For example, the
variable #S:=“SeeView Features”; has a length of 16 bytes. Thus #SIZE #S =
“16”. The operator #SIZE returns information by operating on #S to determine
its size. Some string operators modify the string. For example, #TRIM #S
returns “SeeView”, but also changes the contents of #S to be “Features”.

HPE NonStop SeeView Manual Page 302 of 365


String Operators and String Intrinsics301 describes string operators and
string intrinsics in detail.

string-intrinsic
returns information about the entity that it represents, such as #DATE and
#TIME. Contrast this with string operators that return information about the
contents of a string variable; for example, #SIZE #TIME.

HPE NonStop SeeView Manual Page 303 of 365


String Operators and String Intrinsics301 describes string operators and
string intrinsics in detail.

Example
This example shows how to use the pound sign script symbol.

VAR i:=-1, eof, done, {integer variables & flags


#s, {read line string variable
#sn, #name, #tos, {system num, name, & tos strings
w:=16, pg:=1, {system info width & display page
max:=(80/w*24-1); {max systems per page

TASK netmon; {startup netmon with taskid = netmon


WRITE netmon,"cpus"; {do a "cpus"
FOR 3 DO READ netmon; {read heading, tossing it

DO BEGIN {begin page loop


PAGE pg; CLEAR;
DO BEGIN {begin processing network nodes
PLOT (i:=i+1)/24*w, i mod 24; {show nodes in tabular column form
READ netmon, #s, eof;
IF (#s[1] <> "-") THEN BEGIN
#sn := #TAKE #s; { sysno
#name := #TAKE #s[6:14]; { sysname
#tos := #TAKE #s[48:50]; { tos version
"" & #sn & " " & #name; { display system info
END;
END UNTIL eof OR (done:=(#s[1]="-")) OR (i >= max);
FLUSH;
LET i:=-1; LET pg:=pg+1;
END UNTIL eof OR done;
MSG "N e t w o r k N o d e N a m e s " & #DATE;

HPE NonStop SeeView Manual Page 304 of 365


String Operators and String Intrinsics
This section describes string operators and string intrinsics in detail.

String Operators
String operators work on string variables and string intrinsics. They either return
information or operate on the string variable or string intrinsic.

#ALPHA #string-var [ index-range ]


returns 1 if the first character of #string-var is a…z or A…Z.

#CHAR expression
returns the right byte of an integer expression as a type string. This example
displays ASCII characters 32 .. 95:

VAR i:=31;
FOR 3 DO BEGIN { show chars 32 .. 95
LINE i/32+1;
FOR 32 DO [ #char(i:=i+1) ];
END;

#DEVICEINFO #string-var [ index-range ]


returns device information for the device named in #string-var. The file-
error, 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.NAMETOOLONG";
MSG #DEVICEINFO #s {displays 13 0 0 132,
{ where error = 13 implies illegal filename.

#DOWNCASE #string-var [ index-range ]


returns the contents of #string-var with all alphabetic characters down-shifted
to lowercase.

HPE NonStop SeeView Manual Page 305 of 365


#DROP #string-var [ index-range ]
drops the first alphanumeric token from #string-var as displayed in this example.

VAR #s:="one two three";


MSG #DROP #s; { displays "TWO three"

#INFO #string-var [ index-range ]


returns the following file information for the file named. In this example, the file
error ferr is 0000, the file code fcode is 0100, the group ID grp is 255, the user
ID is 255, the rwep security vector is NUNU, and the file name file is
$DATA.MYVOL.X.

VAR #s:="$DATA.MYVOL.X";
MSG #INFO #s; { displays
0000 0100 255,255 NUNU $DATA.MYVOL.X
ferr fcode grp, user rwep file

#NODE #string-var [ index-range ]


returns sysno name cpusup / cpusgen tos for the node number or name in
#string-var. In this example, the system number is 51, the system name is
\CHICAGO, the cpusup/cpusgen is 3/4, and the NonStop operating system is
version D40.

VAR #s:="*";
MSG #NODE #s; { displays
{ 51 \CHICAGO 3/4 D40

#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.SEESHELL

HPE NonStop SeeView Manual Page 306 of 365


#SIZE #string-var [ index-range ]
returns the length of #string-var in characters. In the following example, the
length of the string variable #s is 28.

VAR #s:="this string is 28 chars long";


MSG #SIZE #s; { displays "28"

#SPECIAL #string-var [ index-range ]


returns 1 if the first character of #string-var is a special character.

#TAKE #string-var [ index-range ]


returns and makes uppercase the first alphanumeric token in #string-var.
In this example, the first alphanumeric token in #s is one.

VAR #s:="one two three";


MSG #TAKE #s; { displays "ONE"

#TASK #string-var [ index-range ]


returns “1” if the task name contained in #string-var exists. Otherwise, it
returns “0”. In this example, the task name represented by #s is TACL, and it does
exist.

TASK tacl;
VAR #s:="TACL";
MSG #TASK #s; { displays "1"

#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.

#s:="one two three"; { s = "one two three"


DO BEGIN { This loop displays three
#t:= #TRIM #s; { Line 25 messages:
MSG #t; { "ONE", "TWO", "THREE"
END UNTIL #s=""; { Note #s = "" when done

#UPCASE #string-var [ index-range ]


returns the contents of #string-var with all alphabetic characters up-shifted to
uppercase.

HPE NonStop SeeView Manual Page 307 of 365


String Intrinsics
String intrinsics return information about the entities they represent, such as #DATE
and #TIME. In contrast, string operators return information about the contents of a
string variable; for example, #SIZE #TIME.

#CACHEFREE
returns the number of free cache memory pages currently available for new user
tasks and menus. Cache pages are used when tasks or menus are declared.
One use of this intrinsic is to determine whether enough free pages remain to
declare a task with a large cache. For example:

IF #CACHEFREE > 200 THEN


TASK TACL CACHE 50 { config more cache for TACL
ELSE
TASK TACL; { let SeeView figure amount

#CACHEPAGES
returns the total number of cache memory pages configured for the current
SeeView environment. It includes both used pages and free pages. Use PARAM
CACHEPAGES to configure SeeView cache size at startup time. (See Appendix
A: Running the SeeView Program.)

#CREATORUSERID
returns a string containing the SeeView process creator security group and user ID
numbers. The information is returned in "GGG,UUU" format, where:
GGG is the security group number.
UUU is the security user number.
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.UserName format, where:
GroupName ::= creator security group name such as SUPER.
UserName ::=creator security user name such as OPERATOR.

HPE NonStop SeeView Manual Page 308 of 365


One use of this intrinsic is to determine the creator security group and user names
for authentication purposes. You can obtain group and user information as follows.

VAR #GrpName := #TAKE #CREATORUSERNAME;


VAR #UsrName := #TAKE #CREATORUSERNAME[#SIZE #GrpName+2:132];

#DATE
returns a string containing the current date and time in YY/MM/DD HH:MM:SS format,
where:

 YY is year modulo 100 (00..99).


 MM is month of the year (1..12).
 DD is day of the month.
 HH is local civil hour of the day (00..23).
 MM is minute after the hour (00..59).
 SS is second after the minute (00..59).
#EXPIRES
returns a string containing the date, in (ddMMMyy) format, when this SeeView
object file expires, where dd is day, MMM is month, and yy is year. If the string
returned is the null string “”, this version of the SeeView program does not expire.

#FIRMID
returns a string containing the firmware ID (for example, A, B, C, D, ..) of the
current SeeView terminal. The terminal firmware ID identifies the version of
firmware (or software for PC emulators) for the current T6500 terminal or emulator.

#FKEY
returns the numeric value of the last function key pressed, where F1 to F16
correspond to values of 1 to 16 and SF1 to SF16 correspond to values of 17 to 32.
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.

HPE NonStop SeeView Manual Page 309 of 365


#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.
One common use of this intrinsic is to determine where to place a window or
menu, based on the location of the cursor when a function key was last pressed.
For example:

IF #FKEYCOL < 40 THEN BESIDE ELSE BELOW;

#FKEYDELETELINE
returns a unique nonzero numeric value (45) if the last function key pressed was
the Delete-Line key. If the last function key pressed was not the Delete-Line key,
the value returned is zero. (This lets you use the intrinsic as a Boolean.)

#FKEYINSERTLINE
returns a unique nonzero numeric value (37) if the last function key pressed was
the Insert-Line 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.)

#FKEYLINE
returns the line number of the cursor when a function key (for example, #FKEY or
#FKEYRETURN) was last pressed. The value of #FKEYLINE ranges from 1
through 24.
One use of this intrinsic is to programmatically move the cursor relative to the last
cursor position when a function key is pressed. For example:

IF #FKEYLINE < (#MENULINE+#MENUHEIGHT-1) THEN


BEGIN { move cursor to next line of current menu
CURSOR #FKEYLINE+1, #FKEYCOL;
END;

#FKEYNEXTPAGE
returns a unique nonzero numeric value (35) if the last function key pressed was
the Next-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.)

#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.)

HPE NonStop SeeView Manual Page 310 of 365


#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. (This lets you use the intrinsic as a Boolean.)

#FKEYROLLDOWN
returns a unique nonzero numeric value (34) if the last function key pressed was
the Roll-Down 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.)

#FKEYROLLUP
returns a unique nonzero numeric value (33) if the last function key pressed was
the 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.)

#FKEYSNEXTPAGE
returns a unique nonzero numeric value (43) if the last function key pressed was
the Shift-Next-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.)

#FKEYSPREVPAGE
returns a unique nonzero numeric value (44) if the last function key pressed was
the Shift-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.)

#FKEYSRETURN
returns a unique nonzero numeric value (47) if the last function key pressed was
the Shift-Return 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.)

#FKEYSROLLDOWN
returns a unique nonzero numeric value (42) if the last function key pressed was
the Shift-Roll-Down 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.)

#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.)

HPE NonStop SeeView Manual Page 311 of 365


#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. For
example:
VIDEO [ #FVBODY ];
One way you can use this intrinsic is to restore video in the body of a window to
normal. To turn off video highlighting:

LINE #FKEYLINE,#FKEYCOL;
VIDEO [ #FVBODY ]; { restore video to normal

#FVMENUBODY
returns the numeric value of the video attributes for the body portion of all menus
in the current SeeView environment. The
VIDEO statement accepts a numeric specification for video attributes. For
example:
VIDEO [#FVMENUBODY];
One way you can use this intrinsic is to restore video in the body of a menu to
normal; for example, to turn off video highlighting.

#LASTPAGE
returns the numeric value of the last user page for the current SeeView
environment. This value is equal to the total number of user pages. The number of
user pages varies depending upon the type of terminal that the SeeView program
has opened. You can also manually configure the total number of user pages by
using the PARAM LASTPAGE option. (See Appendix A: Running the SeeView
Program.)
To programmatically access the Help page:

PAGE #LASTPAGE + 1;

#MENUCACHEFILE
returns the name of the file contained in the cache associated with the last
referenced window. The window can be a nonmenu and can even be an edit-mode
window.
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;

HPE NonStop SeeView Manual Page 312 of 365


#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 fkey-
list.
One way you can use this intrinsic is to programmatically determine where the first
line of text in the window just referenced is located in cache.
For example, to recreate a menu window on the same cache (possibly after
changing something in cache):

WINDOW #MENUTASKID MENU CACHE INDEX #MENUCACHELINE;

#MENUCACHELINEPTR
returns the ordinal cache record number (from 0 to n) of the line of text where the
cursor was located 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
fkey-list. This record in cache corresponds to the cursor position when a line
of text is selected.
You can use this intrinsic is programmatically operate on a selected line of cache
in the window just referenced. For example, to change the word pointed to by the
current cursor position to uppercase:

VAR #s := #MENUTEXT; { text in line pointed to


VAR i := #MENUTOKENINDEX; { char index of token in menutext
VAR L := #SIZE #MENUTOKEN; { length of token to upcase

IF L THEN BEGIN { have a token, upcase it


FOR L DO BEGIN
IF #ALPHA #s[i] THEN #s[i] := #CHAR (#ORD #s[i] AND 223);
i:=i+1;
END;
WRITE #MENUTASKID CACHE #MENUCACHELINEPTR UPDATE,#s;
END;

#MENUCOL
returns the screen column number of the left edge 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. Screen column numbers range from 1
through 80.
You can use this intrinsic to calculate screen locations relative to the most recently
referenced window.
To specify the screen location beside the current menu:

LINE #MENULINE, #MENUCOL + #MENUWIDTH;

HPE NonStop SeeView Manual Page 313 of 365


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.

#MENUHEADING
returns a string that contains the current user-defined heading for 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.
You can use this intrinsic to repaint the last referenced window with the same
heading. For example:

WINDOW #MENUTASKID MENU HEADING #MENUHEADING;

#MENUHEIGHT
returns a numeric value representing the height 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.
You can use this intrinsic is to repaint the last referenced window with the same
size. For example:

WINDOW #MENUTASKID MENU SIZE #MENUWIDTH, #MENUHEIGHT;

#MENUINPUT
returns a string containing the user input text in response to a prompt production
input field for the last referenced menu. You reference a menu prompt production
with a Return or Shift-Return key.
You can use this intrinsic to obtain user input in response to a prompt production
input field. For example:

?MENU MyMenu
Enter Filename:[ ] <==? CALL FileInfo ( #MENUINPUT )

?PROC FileInfo( #filename )


PARM #filename; { #filename = #MENUINPUT
TASK fup; { declare fup task
WINDOW fup, "INFO " & #filename; { do a FUP INFO on #filename

?SECT Main
LINE 4;
WINDOW MyMenu MENU CACHE FIRST size 30,3;

HPE NonStop SeeView Manual Page 314 of 365


Beginning with the C30 SeeView product version, #MENUINPUT returns the text
on the sill of a window up to the cursor position if that window has KEYS SILL
fkey-list specified.
You can use this example to obtain TACL help via the F16 keys.

?SECT TaclWindow
{---------------}
{ Display a tacl window that passes F16
{ through to TACL. So that user can get TACL
{ help by typing on the SILL and pressing F16.
{--------------------------------------------}
PAGE #LASTPAGE;
TASK TACL;
WINDOW TACL CACHE LL KEYS SILL F16
PRODUCTION "CALL PassFkeyCmd(Tacl)";

?PROC PassFkeyCmd(tid);
{---------------------}
{ Pass fkey pressed to taskid=tid along with cmd on the sill
{ Note that the task expects the terminal fkey data stream,
{ so we must build the <SOH> <fkey> <row> <col> data stream.
{-----------------------------------------------------------}
PARM tid;
VAR #s
, #fkeyTransform:= "@ABCDEFGHIJKLMNO" & { f1..f16
"'abcdefghijklmno" & { sf1..sf16
"PQRSTUVW" & "pqrstuv" { others
, #fk:=#char(1) & { <soh>
#fkeyTransform[#fkey] & { <fkey> code
#char(32+0) & { <row>
#char(32+#fkeycol-#menucol-1) { <column>
;
WITH tid; { pickup old prompt
#s := #TASKPROMPT & #MENUINPUT; { #menuinput is sill input
WRITE tid, #MENUINPUT & #fk; { write cmd & fkey to tid
WRITE tid CACHE -1 UPDATE,#s; { suppress #fk in cache
LINE #MENULINE,#MENUCOL; { update window

WINDOW tid CACHE LASTLINE


SIZE #MENUWIDTH,#MENUHEIGHT
PRODUCTION #MENUPRODUCTION
KEYS SAME NOFRAME;

#MENULINE
returns the screen line number of the top edge 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. 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.

LINE #MENULINE, #MENUCOL;

HPE NonStop SeeView Manual Page 315 of 365


WINDOW #MENUTASKID MENU SIZE #MENUWIDTH,#MENUHEIGHT;

#MENUOBJECT
returns a string containing the window attributes of the last referenced window that
invoked the script. You invoke a script with Return, Shift-Return, or any of the
function keys in the WINDOW statement KEYS fkey-list. Attributes are
returned, such as MENU, EDIT, GLASS, SILL, and so on.

#MENUPRODUCTION
returns a string containing the default production 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. The default production is the script
production that is associated with a window by using the MENU or PRODUCTION
options of the WINDOW statement.
If a window does not have a default production associated with it, the intrinsic
#MENUPRODUCTION equals the null string “”. For additional information
regarding productions, see the WINDOW statement MENU and PRODUCTION
options.
You can use this intrinsic to reassert the same default production when repainting
the current window. For example:

WINDOW #MENUTASKID MENU #MENUPRODUCTION


SIZE #MENUWIDHT,#MENUHEIGHT;

#MENUPRODUCTION2
returns a string containing the shift production 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. The shift production is the production
script that is executed when you press Shift-Return.
A window may not have a shift production associated with it, in which case the
intrinsic #MENUPRODUCTION2 equals the null string “”. See the WINDOW
statement MENU and PRODUCTION options for additional information regarding
shift productions.
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;

HPE NonStop SeeView Manual Page 316 of 365


#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.
You can use this intrinsic to:

 Determine other attributes of the task by using a WITH #MENUTASKID


statement.

 Redraw the window with a WINDOW #MENUTASKID statement.


 Search the cache associated with a window by using a
SEARCH #MENUTASKID statement. For example:

?PROC FindNext (#target)


PARM #target; {Find next #target occurrence in menu
VAR NextTargetLine; {line in cache if found

SEARCH #MENUTASKID CACHE #target STARTING #MENUCACHELINE


-> NextTargetLine;

IF NextTargetLine>=0 THEN
WINDOW #MENUTASKID MENU CACHE INDEX NextTargetLine NOFRAME;
ELSE
MSG "No more occurrences of " & #target;

#MENUTEXT
returns a string containing the line of text referenced by the cursor 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 fkey-list. #MENUTEXT returns
only the text to the left of the production symbol and does not include the
production script to be executed if one is present.
This intrinsic is often used to pass information contained in the selected line of
window text to a procedure associated with the window. For example:

?MENU MyMenu
Disc
Tape
Printer

?SECT ShowMenu
LINE 4;
WINDOW MyMenu MENU "CALL ListDev ( #MENUTEXT )" SIZE 12,5;

?PROC ListDev ( #DevType )


PARM #Devtype;
TASK pup;
BESIDE;

HPE NonStop SeeView Manual Page 317 of 365


WINDOW pup, "LISTDEV " & #DevType;

#MENUTOKEN
returns a string containing the token pointed to by the cursor 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 fkey-list.
Use this intrinsic in windows that have unprotected text to allow a user to point at
specific tokens in the window text.
You can point the cursor to any character in the token, and this intrinsic returns the
entire token (a token in this case being characters bound on either side by blanks).
For an example, see the #MENUCACHELINEPTR option in this subsection.309

#MENUTOKENINDEX
returns a numeric value representing the character index of the first character of
the #MENUTOKEN in the #MENUTEXT 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.
Use this intrinsic in windows that have unprotected text. It allows users to point at
specific tokens in the window text. You can point the cursor to any character in the
token, and the intrinsic returns the first character position of the #MENUTOKEN.
For an example, see the #MENUCACHELINEPTR option in this subsection.

#MENUWIDTH
returns a numeric value representing the width in characters 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.
You can use this intrinsic to repaint the last referenced window with the same size.
For example:

WINDOW #MENUTASKID MENU SIZE #MENUWIDTH, #MENUHEIGHT;

#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.
This example starts up an Event Management Service (EMS) printing distributor
that logs EMS events to the SeeView program that started it:

HPE NonStop SeeView Manual Page 318 of 365


TASK emsdist STARTUP "collector $0, type p, textout "
& #MYPROCESSNAME;
WINDOW emsdist CACHE LASTLINE EOFONLY NOFRAME;

#PAGE
returns a numeric value representing the current terminal page number. Values
returned range from 1 through #LASTPAGE+1, where #LASTPAGE is the last user
terminal page, and #LASTPAGE+1 is the Help page.
You can use this intrinsic to step through terminal pages relative to the current
page. For example:

IF #PAGE < #LASTPAGE THEN


PAGE #PAGE+1
ELSE
MSG "At the last page";

#PAGESFREE
returns a string containing a list of integer numbers that represent terminal page
numbers that have no windows on them. For example, if there are seven user
pages, and windows are on terminal pages 1, 3, and 4, the #PAGESFREE intrinsic
returns “2 5 6 7”.
You can use this intrinsic is to find the lowest numbered unused terminal page in
the current environment. For example:

IF #TAKE #PAGESFREE <> "" THEN BEGIN


PAGE #TAKE #PAGESFREE;
WINDOW tacl;
END ELSE
BEGIN
MSG "No terminal pages available to build window.";
END;

#PAGESUSED
returns a string containing a list of integer numbers that represent terminal page
numbers that have windows on them. For example if there are seven user pages,
and windows are on terminal pages 1, 3, and 4, the #PAGESUSED intrinsic
returns “1 3 4”.
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.
{ Force windows to auto refresh by using WAIT 3,REFRESH
{------------------------------------------------------}

HPE NonStop SeeView Manual Page 319 of 365


VAR #s;
DO BEGIN
#s := #PAGESUSED;
WHILE #TAKE #s <> "" DO BEGIN { while pages list them
PAGE #TRIM #s; { flip to next page
LINE25; PAGEMSG; [#TIME]; { display line25 msg
" Press break key to stop page display.";
FLUSH;
WAIT 3, refresh; { Refresh and wait 3 secs
END;
END UNTIL (#DROP #PAGESUSED)=""; { Stop if no pages to show

#PRODNAME
returns a string containing the name of the SeeView product. The standard
SeeShell uses this intrinsic.

#PRODNUM
returns a string containing the HPE part number for the SeeView product. The
standard SeeShell uses this intrinsic.

#REVISION
returns a string containing the revision date of the current SeeView product. The
format of the revision date is in (ddMMMyy) format where dd is day, MMM is month,
yy is year. The standard SeeShell uses this intrinsic.

#SERVERMODE
returns a string containing the numeric value 0, 1, 2, ... of the PARAM
SERVERMODE mode specified at startup time.
You can use this intrinsic to programmatically determine whether the current
SeeView program is running as a server or as an interactive process. For example:

IF #SERVERMODE THEN BEGIN { running as a server


MSG "Running in servermode " & #SERVERMODE;
END;

#SHELL
returns a string containing the name of the current SHELL defined to the SeeView
program. This name can be either a file name (for example,
“$SYSTEM.SYSTEM.SEESHELL”) or a cache name (such as “CACHE
MYSHELL”).
You can use this intrinsic to programmatically reshell the current shell. For
example:

EXECUTE "INVOKE " & #SHELL;

HPE NonStop SeeView Manual Page 320 of 365


#SPACES
returns a string containing all space characters “ ”.
You typically use this as a way to generate a variable number of spaces. For
example:

VAR #name := "Your name";


VAR #RightJustifyName := #SPACES[1:40-#SIZE #name] & #name;

#TASKCACHEFILE
returns the name of the file contained in the cache associated with the current
WITH taskid. The WITH statement indicates which taskid‟s attributes are
returned by the #TASK ... intrinsics. If the cache was not loaded using the SEEDIT
GET command, #TASKCACHEFILE equals the null “” string.
You can use this intrinsic is to determine the files currently being edited in the
SeeView environment. For example:

?MENU files
?SECT main
DELETE files!;
VAR tid:=-1;
FOR #TASKCOUNT DO BEGIN
WITH tid:=tid+1;
IF #TASKCACHEFILE<>"" THEN
PUSH #TASKSYMBOL & " = " & #TASKCACHEFILE onto files;
END;
LINE 4;
WINDOW files CACHE FIRST;

#TASKCACHEFREE
returns a numeric value representing the number of free cache memory pages for
the cache associated with 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 the actual number of cache pages in use by
the current WITH taskid. For example:

?PROC TaskPagesUsed( taskid, PagesUsed )


{---------------------------------------
{ Return number of pages actually used by taskid
{--------------------------------------------------
PARM PagesUsed OUT; {will contain # of pages used

WITH taskid;
PagesUsed := #TASKCACHEPAGES - #TASKCACHEFREE;

HPE NonStop SeeView Manual Page 321 of 365


#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. If the window is a menu,
you can use the intrinsic #MENUCACHELINE instead, without a WITH statement.
For example:

?PROC ScrollWindow (tid,n)


{------------------------}
PARM tid; { taskid of window to scroll
PARM n; { "n" lines to scroll +/-
WITH tid; { get "with" taskid
IF NOT #TASKPAGENO THEN RETURN; { no window on taskid

PAGE #TASKPAGENO; { goto window page


LINE #TASKLINE,#TASKCOL; { position window
WINDOW tid NOFRAME { scroll window "n" lines
SIZE #TASKWIDTH,#TASKHEIGHT
CACHE INDEX #TASKCACHELINE + n;

#TASKCACHELINES
returns a numeric value representing the number of text lines contained in the
cache associated with the current WITH taskid. The WITH statement indicates
which taskid‟s attributes are returned by the #TASK... intrinsics.
You can use this intrinsic to make the height of a window equal to the number of
lines in the cache for that window. For example:

?MENU devices

?PROC ShowDevices (#devtype)


{--------------------------}
{ Show "devices" menu with device names of type = #devtype.
{ Automatically size the height of the window to cache size.
{---------------------------------------------------------}
PARM #devtype; { device type, for example, DISC, TAPE, ..
DELETE devices!; { delete elements in devices menu
LISTDEV #devtype TO devices; { load devices with dev names
WITH devices; { get "with" devices taskid
WINDOW devices FOR #TASKCACHELINES;

?SECT main
CALL ShowDevices ("DISC");

#TASKCACHEPAGES
returns a numeric value representing the number of cache memory pages
allocated for the cache associated with the current WITH taskid. The WITH

HPE NonStop SeeView Manual Page 322 of 365


statement indicates which taskid‟s attributes are returned by the #TASK...
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. Screen column numbers range from 1
through 80. 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 the #TASKCACHELINE option in this subsection318.

#TASKCOUNT
returns a numeric value representing the maximum number of tasks ever declared.
The intrinsic does not require a WITH statement to take effect. You can use this
intrinsic to iterate through all taskids checking for a certain condition.
For example, this example shows a menu of all taskids that have a task symbol
and a running process associated with them.

?MENU MyMenu
?PROC ShowTaskids
{----------------}
{ Display a menu of taskids that are running
{-------------------------------------}
VAR i; {note initial value is -1
DELETE MyMenu!;
FOR #TASKCOUNT DO BEGIN
WITH i:=i+1;
IF (#TASKSYMBOL<>"") AND (NOT #TASKSTOPPED) THEN
PUSH #TASKSYMBOL ONTO MyMenu;
END;
BELOW;
WITH MyMenu;
IF NOT #TASKCACHELINES THEN BEGIN
MSG(R) "No tasks to display !!";
RETURN;
END;
WINDOW MyMenu SIZE 15,#TASKCACHELINES+2;

HPE NonStop SeeView Manual Page 323 of 365


#TASKCPU
returns a string containing the CPU number of the current WITH taskid. The
WITH taskid indicates which task ID's attributes are returned by the #TASK ...
intrinsics. One use of this intrinsic is to determine the CPU of the current WITH
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.
You can use this intrinsic to programmatically inspect the data returned from a
taskid. For example:

TASK netmon;
WRITE netmon, "cpus";
WITH netmon;
DO BEGIN
READ netmon;
IF #NUMERIC #TASKDATA THEN BEGIN { have node data
node := #TAKE #TASKDATA;
..
..
END;
END UNTIL #TASKPROMPTING;

#TASKEDITMODE
returns a numeric value representing the page number where a window is in edit
mode for the current WITH taskid. If there are no windows in edit mode for the
current WITH taskid, zero is returned so that you can use the intrinsic as a
Boolean. The WITH statement indicates which task ID‟s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to programmatically determine if and where there is a
window in edit mode for a given taskid. For example:

?PROC ShowEditWindow ( tasknum )


{------------------------------}
{ Display page that has a window in edit mode for "tasknum".
{---------------------------------------------------------}
PARM tasknum;
WITH tasknum;
IF NOT #TASKEDITMODE THEN BEGIN
MSG "No windows in edit mode for " & #TASKSYMBOL;

HPE NonStop SeeView Manual Page 324 of 365


RETURN;
END;
PAGE #TASKEDITMODE;

#TASKERROR
returns error information about the last TASK statement executed with an
ALLOWERROR option. The value returned depends on which process creation
procedure was used in the last TASK statement.
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.
The ALTER HIGHPINTASKS ON/OFF option controls whether the Guardian
PROCESS_CREATE_ or NEWPROCESS procedure is used for process creation.
If you want PROCESS_CREATE_ to be used, specify HIGHPIN ON. If you want
NEWPROCESS to be used, specify HIGHPIN OFF.
The intrinsic #TASKPROC returns the name of the procedure that was used in the
last task statement. The error codes returned by #TASKERRORTYPE and
#TASKERROR depend on which procedure was used to launch the process. For
information on error codes returned, see the GUARDIAN Procedure Calls
PROCESS_CREATE_ and NEWPROCESS. You use the #TASKERRORTYPE
and #TASKERROR intrinsics to programmatically determine if a TASK statement
executed successfully. For example:

TASK sqlci ALLOWERROR;


IF #TASKERRORTYPE THEN BEGIN { task not started, show error
MSG "TASK Proc = " & #TASKPROC;
MSG "TASK Error = " & #TASKERRORTYPE & "," & #TASKERROR;
RETURN;
END;

#TASKERRORTYPE
returns error information about the last TASK statement executed with an
ALLOWERROR option. The value returned depends on which process creation
procedure was used in the last TASK statement.
If NEWPROCESS was used in the last TASK statement, the value of the
#TASKERRORTYPE intrinsic is the value of bits <0:7> of the ERROR parameter
returned by the Guardian procedure call NEWPROCESS.

HPE NonStop SeeView Manual Page 325 of 365


If PROCESS_CREATE_ was used in the last TASK statement, the value of the
#TASKERRORTYPE intrinsic is the error value returned by the Guardian
procedure call PROCESS_CREATE_.
This intrinsic does not require a WITH statement to have meaning.
The ALTER HIGHPINTASKS ON/OFF option controls whether the Guardian
PROCESS_CREATE_ or NEWPROCESS procedure is used for process creation.
If you want PROCESS_CREATE_ to be used, specify HIGHPIN ON. If you want
NEWPROCESS to be used, specify HIGHPIN OFF.
The intrinsic #TASKPROC returns the name of the procedure that was used in the
last process launch. The error codes returned by #TASKERRORTYPE and
#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.SQLCI";


TASK x:=#program ALLOWERROR;
IF #TASKERRORTYPE THEN BEGIN { task not started, had error
CALL ErrorHandler( #program, #TASKERRORTYPE, #TASKERROR );
RETURN;
END;

#TASKHEIGHT
returns a numeric value representing the height of 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 the size of a window for a given taskid. For
an example, see the #TASKCACHELINE option in this subsection318.

#TASKID
returns a numeric value representing the taskid number of the current WITH
taskid. The WITH statement indicates which taskid‟s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to write general code when it is desirable to not be
concerned with the current taskid variable name. For example:

WITH x; { From here on no reference is made to variable x.

PAGE #TASKPAGENO;
LINE #TASKLINE, #TASKCOL;
WINDOW #TASKID SIZE #TASKWIDTH, #TASKHEIGHT;

HPE NonStop SeeView Manual Page 326 of 365


#TASKIDLASTREAD
returns a numeric value representing the taskid number of the task that responded
to the last READ statement. The intrinsic is not a function of the WITH statement.
You can use this intrinsic to determine the actual taskid number of the task that
completed a READ statement when the PEEROK option is used. For example:

TASK socket := $null; { Socket can be multiple processes.


READ socket PEEROK, #cmd; { PEEROK taskid may not = "socket".
WITH #TASKIDLASTREAD; { Intrinsic returns actual taskid.
IF #TASKxxxxx THEN { Now WITH actual taskid of the
.. { last read statement completion.

#TASKLINE
returns a numeric value representing the screen line number of the top edge of a
window on the 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 in this subsection318.

#TASKMENU
returns a string containing the file or cache name of the script that declared the
current WITH taskid if the taskid was declared by a ?MENU taskid interpreter
directive. The WITH statement indicates which taskid‟s attributes are returned by
the #TASK... intrinsics.
If the current WITH taskid was declared with a TASK statement, #TASKMENU
returns the null string “”.
The intrinsic tells whether the current WITH taskid was declared with a TASK
statement (for example, #TASKMENU=“”) or with a ?MENU directive (for example,
#TASKMENU=“$SYSTEM.SYSTEM.SEESHELL”, indicating the file or cache
name where the menu was declared). #TASKMENU contains the file or cache
name where it came from.
You can use this intrinsic to determine the script file name that declared a given
?MENU taskid.
This example invokes the script that declared the last referenced menu:

WITH #MENUTASKID;
IF #TASKMENU<>"" THEN BEGIN {invoke script that built menu
EXECUTE "INVOKE " & #TASKMENU;
END;

HPE NonStop SeeView Manual Page 327 of 365


#TASKMINUTES
returns a string representing the number of minutes since the current WITH
taskid was started or stopped. Use the WITH taskid statement to specify which
taskid‟s attributes are returned by the #TASK... intrinsics. Use the
#TASKSTOPPED intrinsic to determine whether a task is currently stopped or
running. If the number of minutes is greater than 32766, #TASKMINUTES returns
32766.

#TASKMSGSLASTREAD
returns the number of logical messages in the last I/O block received for the
current WITH statement. The WITH statement indicates which taskid‟s attributes
are returned by the #TASK ... intrinsics.
This feature supports the SeeView Server Gateway and enables a script to
efficiently process BLOCKEDIO messages received from a task.
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. If you
declared the WITH taskid with a
TASK statement, the file name returned is the program object file name on disk.
Otherwise, the name returned is a pseudo process name. The WITH taskid
indicates which taskid‟s attributes are returned by the #TASK... intrinsics.

#TASKPAGENO
returns a numeric value representing the terminal page number where a window
exists for the current WITH taskid. If no windows exist for the current WITH
taskid, zero is returned so that you can use the intrinsic as a Boolean. The WITH
statement indicates which taskid‟s attributes are returned by the #TASK...
intrinsics.

HPE NonStop SeeView Manual Page 328 of 365


You can use this intrinsic to programmatically determine if and where there is a
window for a given taskid. For example:

WITH fup;
IF NOT #TASKPAGENO THEN BEGIN
MSG "No window exists for " & #TASKSYMBOL;
RETURN;
END;
PAGE #TASKPAGENO;

#TASKPEERS
returns a string representing the number of peer tasks associated with the current
WITH taskid. If there are no peers, the value returned is zero. The WITH
taskid statement indicates which taskid‟s attributes are returned by the
#TASKPEERS intrinsic.
Peer tasks share the same cache. For example, within SeeView, a FUP started
from a TACL is a peer to TACL. Both tasks share the same virtual memory cache.

#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... intrinsics. One use of this intrinsic is to determine the PIN of the
current WITH taskid. For example, this displays TACL status for the process
associated with the current WITH taskid.

TASK FUP;
TASK TACL;
WITH FUP;
WINDOW TACL,"STATUS " & #TASKCPU & "," & #TASKPIN;

#TASKPROC
returns the name of the Guardian procedure (NEWPROCESS or
PROCESS_CREATE_) used to launch processes with the most recent RUN,
OPEN, or TASK statement. This intrinsic is useful in interpreting error codes
returned by the intrinsics #TASKERRORTYPE and #TASKERROR because the
values returned depend on which procedure was used to launch the process. For
information on error codes returned by the procedures PROCESS_CREATE_ and
NEWPROCESS, see the Guardian Procedure Calls Reference Manual. This

HPE NonStop SeeView Manual Page 329 of 365


intrinsic is not a function of the WITH statement.

RUN FUP ALLOWERROR;


IF #TASKPROC = "PROCESS_CREATE_" THEN BEGIN
IF #TASKERRORTYPE=1 AND #TASKERROR=11 THEN BEGIN
MSG "File not present";
END;
END;
IF #TASKPROC = "NEWPROCESS" THEN BEGIN
IF #TASKERRORTYPE=3 AND #TASKERROR=11 THEN BEGIN
MSG "File not present";
END;
END;

#TASKPROMPT
returns a string containing the actual prompt text from the current WITH taskid.
The WITH taskid indicates which taskid‟s attributes are returned by the #TASK...
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.";
RETURN;
END;

#TASKPROMPTING
returns a numeric value representing the maximum read length in bytes of the
prompt associated with the current WITH taskid. The WITH statement indicates
which task ID‟s attributes are returned by the #TASK... intrinsics. If the current
WITH taskid is not prompting, #TASKPROMPTING returns 0 so that you can use
this intrinsic as a Boolean. For an example, see #TASKPROMPT.

#TASKSECONDS
returns a string representing the number of seconds since the current WITH
taskid was started or stopped. You can use the WITH taskid statement to
specify which task ID‟s attributes are returned by the #TASK... intrinsics. You can
use the #TASKSTOPPED intrinsic to determine whether a task is currently
stopped or running. If the number of seconds is greater than 32766,
#TASKSECONDS returns 32766.

HPE NonStop SeeView Manual Page 330 of 365


#TASKSTART
returns a numeric value that indicates whether the last
TASK statement executed actually started a new process. The value returned is
zero if a new process was not started. Otherwise, a nonzero value is returned so
that you can use this intrinsic as a Boolean.
This intrinsic is not a function of the WITH taskid statement but rather a function
of the last TASK statement executed.
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.
{-----------------------------------------------------------}
PARM TaclPage;
TASK tacl;
IF #TASKSTART THEN BEGIN
MSG "One moment, starting TACL"; { advise user on line25
PAGE TaclPage; { display tacl page
WINDOW tacl CACHE LASTLINE; { build tacl window
FLUSH; { flush output
WITH tacl;
WHILE NOT #TASKPROMPTING DO { show tacl init
BEGIN
READ tacl; { After each tacl msg
WAIT 0,REFRESH; { refresh window with msg.
END;
WRITE tacl,"Obey MyInit"; { Tacl init done, obey MyInit
END;

#TASKSTOPPED
returns a numeric value that indicates whether the current WITH taskid is
stopped. Zero is returned if the current WITH task is not stopped so that you can
use this intrinsic as a Boolean.
A nonzero value is returned if the current WITH task is stopped. Nonzero values
correspond to the reason for the stopped state. A -5 indicates a normal STOP
state, and -6 indicates an abnormal ABEND state.
The WITH taskid statement indicates which taskid‟s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to test the state of a taskid variable prior to attempting
interprocess communication with that task by using a

HPE NonStop SeeView Manual Page 331 of 365


WRITE or READ statement (Issuing a WRITE or READ against a stopped task
results in a run-time error.) For example:

WITH tacl;
IF #TASKSTOPPED THEN CALL StartTacl;
WRITE tacl, #command;

#TASKSYMBOL
returns a string containing the symbolic name of the current WITH taskid
variable. The WITH taskid statement indicates which taskid‟s attributes are
returned by the #TASK... 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.";
FLUSH;
CALL DoTaskStart ( #TASKSYMBOL );
END;
WINDOW tasknum,#command CACHE LASTLINE;

#TASKTIMESTAMP
returns a string representing the date and time that the current WITH taskid was
started or stopped. You can use the WITH taskid statement to specify which
taskid‟s attributes are returned by the #TASKTIMESTAMP intrinsic. The format of
the data returned is YY/MM/DD HH:MM:SS. You can use the #TASKSTOPPED
intrinsic to determine whether a task is currently stopped or running.

#TASKUSERID
returns a string containing the security group and user ID for the current WITH
taskid. The WITH statement indicates which taskid's attributes are returned by
#TASK... intrinsics. The values are returned in GGG,UUU format, where:
GGG is the security group number.
UUU is the security user number.
Use this intrinsic to determine the security user ID associated with any SeeView
TASK variable. For example, this example returns the security group and user ID
of the FUP task that has SeeView opened.

WITH FUP;
Var #GrpNo := #TASKUSERID[1:3];

HPE NonStop SeeView Manual Page 332 of 365


Var #UsrNo := #TASKUSERID[5:7];
IF #GrpNo = 255 THEN MSG "FUP accessorid is in SUPER group";

#TASKUSERNAME
returns a string containing the security group and user name for the current WITH
taskid. The WITH statement indicates which taskid's attributes are returned by
the #TASK... intrinsics. Values are returned in GroupName.UserName format,
where:
GroupName ::= security group name such as SUPER.
UserName ::= security user name such as OPERATOR.
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. The WITH statement indicates which taskid‟s attributes are returned by
the #TASK... intrinsics.
You can use this intrinsic to determine the size of a window for a given taskid.
For an example, see #TASKCACHELINE in this subsection318.

#TERMFILENAME
returns a string containing the NonStop file name of the current SeeView terminal.
You can use this intrinsic to inform an external user, or program, of the name of
the SeeView terminal. For example:

MSG "The file name of this terminal is " & #TERMFILENAME;

#TERMFILENAMEOLD
returns a string containing the file name of the SeeView terminal prior to the last
connect operation. If no prior connect has been performed by this SeeView, the
intrinsic returns the null string.
You can use this intrinsic to reconnect SeeView to the terminal where it was
previously connected. For example:

TASK SEEDIT;
WITH SEEDIT;
IF NOT #TASKSTART THEN
IF NOT #TASKPROMPTING THEN BREAK SEEDIT;

HPE NonStop SeeView Manual Page 333 of 365


#s := "CONNECT " & #MYPROCESSNAME & " TO " & #TERMFILENAMEOLD;
WRITE SEEDIT,#s;

#TERMID
returns a string that represents the terminal type of the current SeeView terminal.
Terminal types correspond to the following product numbers: T6530, T6526,
T6540 (PCT), and so on.
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 { Device is a PC running PCT, and


(#firmid>="C") { Firmware level is C or higher.
THEN BEGIN { Device can handle color.
CALL SeeColor ("SHOW"); { Call proc to display colors.
END;

#TIME
returns a string containing the current time in HH:MM:SS format, where:
HH is local civil hour (00..23).
MM is minutes (00..59).
SS is seconds (00..59).

#TIMERCPUMS
returns the CPU process busy time in milliseconds since ALTER STATISTICS ON
or the last function key was pressed.

Note. The returned value is a string representation of the 32-bit value and might not
be suitable for 16-bit computation.

#TIMERCPUSECS
returns the CPU process busy time in seconds since ALTER STATISTICS ON or
the last function key was pressed.

Note. The returned value is a string representation of the 32-bit value and might not
be suitable for 16-bit computation.

#TIMERMS
returns the elapsed time in milliseconds since ALTER STATISTICS ON or the last
function key was pressed.

HPE NonStop SeeView Manual Page 334 of 365


Note. The returned value is a string representation of the 32-bit value and might not
be suitable for 16-bit computation.

TIMERSECS
returns the elapsed time in seconds since ALTER STATISTICS ON or the last
function key was pressed.

Note. The returned value is a string representation of the 32-bit value and might not
be suitable for 16-bit computation.

#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.

#TOSVERSION
returns a string containing the current operating system Vnn product version.
V represents the letter version of the operating system.
represents the current number version.
Nn

#USERID
returns a string containing the security group and user ID for the current SeeView
process. The values are returned in GGG,UUU format, where:
GGG is the group number.
UUU is the user number.
This intrinsic can be used to determine the security group and user accessor ID of
the SeeView process running the current script:

Var #GrpNo := #USERID[1:3];


Var #UsrNo := #USERID[5:7];
IF #GrpNo <> 255 THEN MSG "Not in SUPER group";

HPE NonStop SeeView Manual Page 335 of 365


#USERNAME
returns the user name of the current SeeView process access ID. The name is
returned in GROUP.USER format.
You can change the current access ID and creator access ID with the HELLO
statement. To obtain the group and user:

VAR #GrpName := #TAKE #USERNAME;


VAR #UsrName := #TAKE #USERNAME[#SIZE #GrpName+2:132];

#VERSION
returns a string containing the product version of the current SeeView process.
The format of the product version information returned is in Vnn format, where V is
a 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. The SPR information returned is in “aaa” format, where “aaa”
are letters representing the SPR, such as AAA, AAB, and so on.
The following example returns “SeeView D20 AAA”.

MSG #PRODNAME & " " & #VERSION & " " & #VERSIONIPM;

#VOLSUB
returns a string containing the current default volume and subvolume for the
SeeView process. You can alter the value of this intrinsic with the ALTER
VOLUME statement.
You can use this intrinsic to refer to the name of a file located on the current
default subvolume. For example:

?PROC FileInfo ( #file )


{----------------------}
{ This proc uses the #INFO string operator to display file
{ info on the simple file name contained in string #file.
{ Note that #file is expanded using the current default subvol.
{-----------------------------------------------------------}
PARM #file;
#file := #VOLSUB & "." & #file;
MSG #INFO #file;

HPE NonStop SeeView Manual Page 336 of 365


#VOLSUBINVOKE
returns a string containing the current volume and subvolume specified with the
ALTER INVOKEVOL statement. Use this intrinsic when you want to refer to the
current INVOKE subvolume.
The INVOKE subvolume is the default subvolume for the INVOKE statement; for
example, the subvolume that is expanded when you specify a simple file name in
an INVOKE statement.

#VOLSUBOBJECT
returns a string containing the current volume and subvolume of the SeeView
object file. Use this intrinsic when you want to refer to the subvolume where the
SeeView object and associated files are located.

HPE NonStop SeeView Manual Page 337 of 365


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 & ".SEESHELL"; { form full name


TASK shell := $shell CACHE 100; { declare cache
DELETE shell!; { clear cache
EXECUTE "LOAD " & #SeeShell & ",shell"; { load cache
INVOKE CACHE SHELL; { invoke cache

HPE NonStop SeeView Manual Page 338 of 365


Appendix 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.
SEEVIEWS The online help text for SeeView statements and function
keys.
SEECSTM User custom menus and procedures kept in a user‟s default
subvolume. If you want the features provided by the
SEECSTM file, duplicate the SEECSTM file to your default
subvolume.
SEELOCL Local site menus and procedures shared among site users.
SEENET Networkwide menus and procedures shared among all
users.

Note. The contents of the SEECSTM, SEELOCL, and SEENET files are meant to serve
as examples only. You can customize these files to fit your own environment.

How to Run the SeeView Program


To start the SeeView program, issue a startup command at a TACL prompt.

SEEVIEW/ NAME [ pid ] [ ,IN file ] [ ,OUT file] [,option ] /


[ statement ]

NAME pid
specifies the process name of the SeeView program.
The SeeView program name must have no more than four characters (not
including the dollar sign, $).

HPE NonStop SeeView Manual Page 339 of 365


IN file
specifies an alternate SeeView shell input file.

OUT file
specifies the terminal that the SeeView program opens.

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.

 PARAM CACHE cache-pages: This parameter specifies the total size of the
cache pool used by the SeeView program to hold individual tasks‟ caches. The
cache pool is allocated evenly among the total number of task control blocks
available unless a task or ?MENU statement specifies another value with the
CACHEPAGES option. Thus, normally each ?MENU or task gets an equal
fractional amount of the total cache pages available when it is declared.
The value passed in this PARAM cache-pages is a value in pages. Each cache
page is 2048 bytes in size, and the default is 2048 pages (which is split up among
all your tasks).
PARAM EXTENSIBLE cache-pages: This parameter defines the total number
of memory pages allocated for user task caches and symbols. PARAM
EXTENSIBLE allocates an extensible cache segment for SeeView cache so that
disk space for cache memory pages is allocated only as needed.
If you specify PARAM EXTENSIBLE extensible-pages and do not specify
PARAM CACHE cache-pages, the extensible-pages value specifies the size
of extensible cache. If you specify both parameters, the extensible-pages
value is used only as a Boolean to indicate whether the cache is extensible.
If the disk volume for SeeView cache does not have enough disk space, SeeView
might abend with an “ABEND No disk space available for extensible segment”
message.

HPE NonStop SeeView Manual Page 340 of 365


The difference between extensible and nonextensible cache is that the disk space
for extensible cache is allocated as needed. If space is not available when needed,
SeeView can abend long after it was originally started. However, all of the disk
space for a non-extensible cache is immediately allocated at SeeView runtime. If
space is not initially available, SeeView abends immediately.
Depending on applied usage, certain applications might need to settle allocation
issues at run time, and others might be able to use extensible space allocation.

 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. These
display pages are in the terminal‟s local memory, not cache-type memory pages of
2048 bytes. The SeeView program chooses a default value for the last user page
based on the type of terminal or emulator you are using. If you do not want to use
the default number of pages, you can set a new value with this parameter. Use
caution when increasing this value. There is a trade-off between the number of
windows and fields a terminal can support and the number of terminal pages.

 PARAM MODEMWAIT seconds: This parameter redefines the time in seconds
that SeeView waits for a modem to reconnect before SeeView abends with a
modem disconnect error (file-system error 140). Specifying seconds equal to 0
indicates that SeeView waits indefinitely. The default is 240 seconds.

 PARAM PEP max-libprocs: This parameter redefines the maximum number
of procedures that you can declare in the procedure library. The default is 512.

 PARAM POOLPAGES max-iopool-pages: This parameter redefines the


maximum number of pool pages allocated. You use pool pages to build large
input-output buffers such as the reply buffer for the WRITE..FROM option. The
default is 24 pages.

 PARAM SERVERMODE mode: This parameter runs the SeeView program with
no block-mode input-output file when the value of mode is nonzero. (The default is
zero.) These values define mode functions:
0 Open outfile as block-mode terminal.
1 Do not ever open outfile, run silently.
2 Open outfile only if an error occurs.
3 Open outfile, show all Msg cache messages.

HPE NonStop SeeView Manual Page 341 of 365


4 Same as 3, and enable ALTER STMTTRACE ON.
The SERVERMODE parameter operates the SeeView program as a server. You
can use this capability as a command interpreter gateway for workstation
applications. When SERVERMODE is 3 or higher, MSG statement output is
displayed in conversational mode, so scripts can display information using the
MSG statement.

 PARAM SYMBOLS max-symbols: This parameter redefines the maximum


number of string and integer symbols that you can declare. The default is 256
symbols.

 PARAM TASKS max-task-limit: This parameter redefines the maximum


number of SeeView tasks and menus that you can declare. The max-task-
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. For example:
SEEVIEW /NAME/ PARAM TASKS 300, SYMBOLS 512, CACHE 4096
The previous example is equivalent to:
PARAM TASKS 300
PARAM SYMBOLS 512
PARAM CACHE 4096
SEEVIEW /NAME/
You can include both PARAM options and statements in the startup message. For
example:
SEEVIEW/NAME/ PARAM CACHE 4096; ON $DATA.SUBVOL.MYSHELL
This feature allows subsystem commands that do not support PARAM statements,
such as the SAFECOM ADD TERMINAL command, to start SeeView and specify
custom SeeView startup PARAM values.

Startup Modes
When you start the SeeView program, it selects its command input file from one of
several different sources depending on the operating mode chosen.

HPE NonStop SeeView Manual Page 342 of 365


SeeShell Mode
If a file named SeeShell is present in the current default subvolume or the SeeView
program object subvolume, the commands contained in the SeeShell file are
automatically executed. This startup environment is the default. The startup command
for the SeeShell mode is:
1> SEEVIEW /NAME/

Standard In-File Mode


If you specify IN filename at startup, the SeeView program executes the commands
contained in the specified file. An input file specification overrides the presence of a
SeeShell file. The startup command for the input file mode is:
1> SEEVIEW /NAME, IN filename/

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. The startup command for the environment switch mode is:
1> SEEVIEW /NAME/ ON filename

Interactive Mode
If neither the IN specification nor the ON statement is included in the startup command,
and the SeeShell file is not present in the current default subvolume or SeeView
program object subvolume, the SeeView program places a free window on terminal
page one and displays an advisory message. You are then free to proceed as desired.
The startup command under these conditions is:
1> SEEVIEW /NAME/

HPE NonStop SeeView Manual Page 343 of 365


Appendix 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. Summary of Function Key Operations for 6500-Series Terminals

F1 Previous terminal page SF1 First terminal page


F2 Next terminal page SF2 Last terminal page
F3 Back one command SF3 Back to oldest command
F4 Forward one command SF4 Forward to newest command
F5 Insert line or enable editor SF5 Insert free cursor on/off
F6 Delete line or enable editor SF6 Delete window
F7 Retrieve line SF7 Retrieve window
F8 Copy line SF8 Copy window
F9 Break window or line (editor) SF9 Define window
F10 Join window or line (editor) SF10 Beep
F11 Return to Help page SF11 Save screen to savefile
F12 Find Text line on sill SF12 Roll right by cursor amount
F13 Status on Help page SF13 Roll left by cursor amount
F14 Help; HELP ALL on Help page SF14 Recover all windows
F15 Tab backwards (word/column) SF15 Execute shell file/cache
F16 Tab forwards (word/column) SF16 Exit or shutdown
Prev Page Prev page window text S-Prev Page First page of text
Next Page Next page window text S-Next Page Last page of text
Roll Down Text one line S-Roll Down Text 1/3 window
Roll Up Text S-Roll Up Text 1/3 window
Insert Line Enable/ disable editor Delete Line Eofseek on/off

HPE NonStop SeeView Manual Page 344 of 365


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. Summary of Function Key Operations for the PC

F1 Previous terminal page SF1 First terminal page


F2 Next terminal page SF2 Last terminal page
F3 Back one command SF3 Back to oldest command
F4 Forward one command SF4 Forward to newest command
F5 Insert line or enable editor SF5 Insert free cursor on/off
F6 Delete line or enable SF6 Delete window
editor
F7 Retrieve line SF7 Retrieve window
F8 Copy line SF8 Copy window
F9 Break window or line SF9 Define window
(editor)
F10 Join window or line SF10 Beep
(editor)
Alt F1 Return to Help page SF11 Save screen to savefile
Alt F2 Find Text/ line on sill S-Alt F2 Roll right by cursor amount
Alt F3 Status on Help page S-Alt F3 Roll left by cursor amount
Alt F4 Help; HELP ALL on Help S-Alt F4 Recover all windows
page
Alt F5 Tab backward S-Alt F5 Execute shell file or cache
(word/column)
Alt F6 Tab forward S-Alt F6 Exit or shutdown
(word/column)
Page Up Prev page window text Alt Page Up First page of text
Page Down Next page window text Alt Page Last page of text
Down
Alt Up Text up one line Alt Shift Text up 1/3 window
Arrow Up Arrow
Alt Down Text down one line Alt Shift Text down 1/3 window
Arrow Down Arrow
Control INS Enable or disable editor Control DEL Eofseek on or off

HPE NonStop SeeView Manual Page 345 of 365


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.
In addition to terminal user pages, an extra terminal page is called the Help page. This
page provides a convenient extra page for obtaining process status information or
command help without disturbing user pages.

SF1
Displays the first terminal page. This function key always displays terminal page one.

F2
Displays the next higher numbered terminal page. If you are already on the last page,
it displays the first page. Terminal pages are numbered from 1 to lastpage, where
the last page is 7, 8, or 13, depending on terminal type.

SF2
Displays the last terminal page or the highest numbered terminal page that has one or
more windows on it.

F3
Scrolls back one command, or scrolls down window text. The operation performed by
this function key depends on the cursor location. When the cursor is on the sill,
function keys F3, F4, SF3, and SF4 depend on the ALTER SILLSCROLL ON | OFF
setting. If the cursor is on the sill of a window and SILLSCROLL is ON (the default), F3
displays the command history for this window. Each time you press F3, a previous
command in the command history appears.
If the cursor is within the window or SILLSCROLL is OFF, F3 scrolls the text within the
window down 1/3 the height of the window.

HPE NonStop SeeView Manual Page 346 of 365


SF3
Displays the oldest command for the window, or scrolls down window text. If the cursor
is on the sill of a window, SF3 displays the command history for this window. When
you press SF3, the oldest command in the command history appears.
If the cursor is within the window, SF3 scrolls the text within the window down one line.

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. For a description of the effect of the SILLSCROLL setting on the action
of this function key, see F3.

SF4
Displays the most recent command for window, or scrolls up window text.
If the cursor is on the sill of a window, SF4 displays the command history for this
window. When you press SF4, the newest command in the command history appears.
If the cursor is within the window, SF4 scrolls the text within the window up one line.
For a description of the effect of the SILLSCROLL setting on the action of this function
key, see F3.

F5
Inserts line, or enables the editor.
If the cursor is on the sill of a window, F5 enables the window editor by putting the
window into edit mode.
If the cursor is within a window and you enable the window editor, F5 inserts a line at
the cursor position.

SF5
Toggles free-cursor mode on and off, or inserts text blocks to end of page.
If the cursor is within the text portion of a window and you enable the window editor,
SF5 inserts blank text lines from the current cursor position to the end of the current
text page.

HPE NonStop SeeView Manual Page 347 of 365


If the cursor is not in an edit-mode window, SF5 alternately enables or disables free-
cursor mode for the current terminal page being displayed.
Free-cursor mode allows the cursor to move freely over the entire page regardless of
whether windows on that page have glass (GLASS). When you enable free-cursor
mode, the glass from all windows on the current page is removed. When you disable
free-cursor mode, have the glass area of the window restored for windows that have
glass.

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.
If the window designated by the cursor is not in edit mode, the window is physically
deleted. Although the window is deleted, the status of the process that was executing
in the window is not affected, and you can build another window on that process.
If the cursor is within the text portion of a window and you enable the window editor,
SF6 deletes text lines from the current cursor position to the end of the current text
page.
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.

F7
Retrieves line from copy/retrieve text stack.
If the cursor is on the sill of a window, F7 retrieves the line of text that is on top of the
copy/retrieve text stack.
If the cursor is within a window and you enable the window editor, F7 retrieves the line
of text that is on top of the copy/retrieve text stack.
Deleted or copied lines are retrieved from a common copy/retrieve text stack. This
provides a way to copy, delete, and retrieve text between and within windows.

HPE NonStop SeeView Manual Page 348 of 365


SF7
Retrieves window, or retrieves text block to end of page.
If the window designated by the cursor is not in edit mode, the window is physically
replaced with a window on the taskid that was copied via the copy window function
key, SF8.
If the cursor is within the text portion of a window and you enable the window editor,
SF7 retrieves deleted or copied text. The restored text is inserted at the current cursor
position and can run to the end of the current text page.
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.
Copied lines are stored in a common copy/retrieve text stack. This makes it possible to
copy and retrieve text between and within windows.

SF8
Copies window, or copies text block to end of page.
If the window designated by the cursor is not in edit mode, the taskid of the window
is copied. You can then retrieve a window on that taskid elsewhere by using the
retrieve window function key, SF7.
If the cursor is within the text portion of a window and you enable the window editor,
SF8 copies text lines from the current cursor position to the end of the current text
page.
Copied lines are stored in a common copy/retrieve text stack. This makes it possible to
copy, delete, and retrieve text between and within windows.

F9
Breaks window or text line.
If the window designated by the cursor is not in edit mode, the window is broken into
two separate windows. The point at which the window is broken is determined by the

HPE NonStop SeeView Manual Page 349 of 365


cursor location. The window edge nearest the cursor is the edge that will be broken.
The join window function key, F10, joins windows together.
If the window is in edit mode, the line of text designated by the cursor is broken at the
cursor location. Text to the left of the cursor remains on the current line and text from
the cursor position to the end of the line appears on the following line.

SF9
Defines window. This function key interactively defines the physical dimensions of a
window. If the cursor is pointing to a screen area that does not contain a window, you
can define the opposite corners of a window. Once you define the second corner, a
window is built.
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. The
break window function key, F9, breaks up a window.
If the window is in edit mode, the line of text designated by the cursor is joined with the
next text line. The width of the joined line thus formed is determined by the width of the
window or the ALTER JOINWIDTH statement, and the column offset is set with the
scroll left or right function keys, SF12 or SF13. You can use HELP ALTER
JOINWIDTH to override the window width.

SF10
Beeps. This function key is reserved for future use.

F11
Returns display to the Help page. User pages 1 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. F11 displays this extra page,
allowing for extra operations without disturbing the user environment.
Pressing F11 twice in succession builds a SeeView window for script development.
(For a detailed discussion of this function, see Section 7: SeeView Interpreter
Interface.)

HPE NonStop SeeView Manual Page 350 of 365


SF11
Saves screen to SAVEFILE. The text on the current terminal page is copied to the file
defined by the ALTER SAVEFILE option.
This function is most useful when the ALTER FRAMEALPHA ON option is turned ON,
thus allowing windows to be drawn using simple vertical and horizontal characters to
delimit window frames.

F12
Enables FIND / target-text / on sill, or FIND LINE num | ? on sill. This function
searches the current window cache for the text defined on the sill of the current
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.
If the window is in edit mode, the search begins at the current cursor position within the
window. To display subsequent matches, press F12 repeatedly.
If the window is not in edit mode, forward searches start at the beginning of the text in
the current window and backward searches start at the end of the text in this window. If
the target is found, the line containing this text appears as the first line of the text in the
current window. After the first occurrence appears, you can continue to search for the
target by pressing F12.
If the sill contains L? or LINE?, the logical line number designated by the cursor
appears on line 25. This provides a means of identifying a line number.
If the sill contains L num or LINE num, the specified logical line number appears in the
current window. This provides a means of displaying the text at a specific line number.

SF12
Rolls right by cursor amount. The text in the current window is scrolled to the right by
the number of characters indicated by the current cursor position.
If the cursor is in column 1 of the current window, the text in that window is scrolled to
the right by one character unless the window is rolled all the way to the right. Likewise,
if the cursor is in column 20 of the current window, the text is scrolled to the right by
twenty characters.

F13
Shows user task status in largest free window on the Help page. User pages 1 through
lastpage are reserved for user-defined windows. In addition to these pages, one extra

HPE NonStop SeeView Manual Page 351 of 365


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. F13 displays this extra page with a summary of user tasks appearing in the
largest free window on the page.

SF13
Rolls left by cursor amount. The text in the current window is scrolled to the left by the
number of characters indicated by the current cursor position.
If the cursor is in column 1 of the current window, the text in that window is scrolled to
the left by one character unless the window is rolled all the way to the left. Likewise, if
the cursor is in column 20 of the current window, the text is scrolled to the left by 20
characters.
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. F14 displays this extra page with a summary table of
all SeeView keywords and function keys appearing in the largest free window on the
page.

SF14
Recovers all windows and menus. This function recovers all window frames, headings,
and text by rebuilding all currently defined windows from scratch.
This function is provided to recover from irrecoverable input-output errors, such as a
device power off or on or input-output parity errors. It is also useful when you
inadvertently erase text from a window that is in edit mode.

F15
Tabs cursor backward (word/column).
If ALTER option WORDTAB is ON (the default) and the cursor is in a window, the tab
is a word tab. Otherwise it is a column tab.
When the cursor is on the sill, F15 and F16 (tab cursor forward) perform a column tab.

HPE NonStop SeeView Manual Page 352 of 365


SF15
Invokes shell file or cache.
If the current page is not the Help page, this function executes all SeeView sections in
the cache or file defined by the ALTER SHELL option. This function reinvokes the
initial shell, or invokes a new shell when you change it with the ALTER SHELL option.
Note. User-defined menu productions containing CALL or INVOKE statements provide
another way of executing user-defined procedures or programs.

F16
Tabs cursor forward (word/column).
If ALTER option WORDTAB is ON and the cursor is in a window, the tab is a word tab.
Otherwise it is a column tab.
When the cursor is on the sill, F15 and F16 perform a column tab.

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.

Shift-PrevPage
Displays first page of window text.

NextPage
Displays next page of window text.

Shift-NextPage
Displays last page of window text.

HPE NonStop SeeView Manual Page 353 of 365


RollDown
Rolls down window text one line.

Shift-RollDown
Rolls down window text 1/3 of window height.

RollUp
Rolls up window text one line.

Shift-RollUp
Rolls up window text 1/3 of window height.

InsertLine
Enables or disables editor.

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 ALTER 160.

HPE NonStop SeeView Manual Page 354 of 365


Appendix 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.

vstc01

If you mark files with any of the preceding letters and then press return, the operation
corresponding to that letter is performed against the file marked with the letter. In the
following example, S was used to resecure marked files.

HPE NonStop SeeView Manual Page 355 of 365


vstc02

?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 -> COPY or display the first few pages of a file


D -> DUP file, prompt for <fileset>.* [,options]
F -> INFO file
G -> GIVE file, prompt for <group>,<user>
I -> INFO file, DETAIL
P -> PURGE file, prompt for confirmation
S -> SECURE file, prompt for RWEP vector
X -> COPY first few pages of file in hex

Note that the main purpose of this script is as a


programming example, not necessarily file maintenance.

This working script is an example only, its primary


purpose is to show how a large variety of SeeView
statements, features, and scripting techniques can
be used together.

When the script is first invoked the user is prompted


for a disk subvolume.

When a subvolume is entered and the Return key


is pressed, the proc "FileInfo" is called with the

HPE NonStop SeeView Manual Page 356 of 365


response to the subvolume prompt passed via the
#MENUINPUT intrinsic to the Fileinfo proc as a string
parameter variable named #SV.

The proc FileInfo then starts a dynamic copy of the


output from a FUP INFO command to the "Files" menu.

Once the Files menu is displayed, an operation can be


performed against a file in the "Files" menu by
"marking" the file with a letter contained in the table
below, Command marks, rules, and prompt text.

Help text is available by pressing SHIFT-RETURN.


This help text includes all of the text that you are
currently reading. Note that both the default
production and shifted production calls are associated
with the "Files" menu by using the WINDOW .. MENU
option in the proc "FileInfo."
When Files are marked and the RETURN-KEY is pressed,
the proc "FileMaint" is called.

The "FileMaint" proc does a nowaited ACCEPT statement


to read the marks from the Files menu. This ACCEPT
statement read marks from the Files menu into a
"scratch" cache.
The "scratch" cache is then sequentially read with
the READ scratch CACHE <index> 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.

If the "command template" contains a circumflex ^


character then the marked filename is folded into the
command at the location of the circumflex character
(eg INFO ^,DETAIL). Otherwise the file is folded in
at the the end of the command (eg INFO).

If the "command template" contains a pound sign #


character then the user is prompted for the information
contained in the "prompt parameter" defined in columns
60:132 below (eg SECURE ^,"#" => "Enter Security RWEP").

{-------------------------------------------------------------------}
{ Command marks, rules, and prompt text. }
{-------------------------------------------------------------------}
{
{ Columns Definition
{ ------- ----------
{ [1] Command marks (see SEARCH statement in FileMaint proc)
{ [5] Window no/wait "." don't wait for window to fill else wait
{ [6:59] Command template "^" file, "#" prompt
{ [60:132] Command paramter prompt if # occurs in template
{
{...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+

D =>.DUP ^,# Dup to <fileset>.*

HPE NonStop SeeView Manual Page 357 of 365


C => COPY ^,,SHARE,COUNT 57
X => COPY ^,,SHARE,COUNT 12,hex,recout 36,fold
F =>.INFO
G =>.GIVE ^,# Give <group>,<user>
I => INFO ^,DETAIL
P =>.PURGE ^# Enter ! to purge.
S =>.SECURE ^,"#" Enter Security RWEP
?MENU files { Contains file info for prompted subvolume
?MENU scratch { Temporary scratch cache
?PROC FileInfo { #sv }
{--------------------}
{ This proc is called from the popup prompt named "Enter Subvol."
{ The proc does a FUP INFO * on the #menuinput passed as PARM #sv;
{
{ The output from the INFO is automatically copied to the "FILES"
{ menu through the use of the TASK .. COPY option.
{
{ The COPY operation:
{ 1) Automatically stops the COPY when FUP prompts again.
{ 2) Allows the script to not wait for the FUP INFO operation.
{ 3) Allows a private copy of only the output from the INFO command.
{ 4) Prevents other FUP output from appearing in the "FILES" menu.
{----------------------------------------------------------------}
PARM #sv; { #sv = subvol for FUP INFO #sv.*
VAR #s { scratch string variable
,#z { scratch string variable
;
TASK fup; { Fup task to do copy to Files menu
#subvol := #sv; { set global to prompt response

WITH fup; { with fup for #TASKxxx intrinsics


WRITE fup,"info " & #subvol & ".*"; { do FUP INFO #sv.*
DO BEGIN { Parse response until info starts
READ fup, #s; { with a $ or \ or prompt.
#z := #TAKE #s; { #z is first token in response
END UNTIL #TASKPROMPTING OR (#z="$") OR (#z="\");

DELETE Files!; { Clean out Files menu


TASK fup COPY Files; { start copy "info" to FILES cache

BELOW; CW; { Below the subvol prompt, clear, and


WINDOW Files { display Files menu in real time.
MENU "CALL FileMaint (#take #menutext)" { default production
,"CALL ShowHelp ( MyMenu,'This script')" { shifted production
SIZE #MENUWIDTH { width of menu
PAGES { allow pagenation
NOFRAME; { don't re-draw frame

MSG (REVERSE) "Press Shift-Returnfor help."; { advise help available

?PROC ShowHelp { cacheid, #target }


{---------------------------------}
{ Display help text window on cache = "cacheid."
{ Position help text window beside calling menu.
{ Window help text begins with the text contained in #target.
{------------------------------------------------------------}
PARM cacheid { Cacheid where help text & target are located
,#target { Target string to search for in "cacheid."

BESIDE; { Position beside callers menu

HPE NonStop SeeView Manual Page 358 of 365


WINDOW cacheid { Window on #target text in cacheid cache.
CACHE #target UNTIL"//" NOCURSOR
HEAD "" SIZE 80;
?PROC FileMaint { #file }
{-----------------------}
{ This proc performs marked operations on the marked files by:
{
{ 1) ACCEPT-ing command marks into a "scratch" cache from "FILES" menu.
{ 2) Reading each line in "scratch" cache to determine files marked.
{ 3) Read "FILES" cache to determine filename corresponding to mark.
{ 4) Searching MyMenu for the command #rule corresponding to the mark.
{ 5) Exploding rules for <file> operation corresponding to the mark.
{ 6) If user input is required, then prompts for parameters.
{ 7) Performs marked operation according to the rule in cache MyMenu.
{
{ If no files marked, do a INFO <file>,DETAIL on the passed PARM #file.
{----------------------------------------------------------------------}
PARM #file; { file pointed to.
VAR menuline1 := #menucacheline { first cache line in file menu
, row { n-th cache line in file menu
,#opfile { File marked with #op
,#op { operation to do on #file
,#lastop { last operation done on #file
,#rule { if #op in MyMenu then command
,#prompt { if #op in MyMenu then prompt
,#response { if #prompt then response to it
, WaitForOp { if #op in MyMenu then WaitForOp
, eof { end of file flag
,#s { scratch string
,#z { scratch string
, i { scratch integer
, fkrow:= #FKEYLINE { cursor row
, fkcol:= #FKEYCOL { cursor column
;
DELETE fup!; PUSH "-" ONTO fup; { cleanup fup cache.
DELETE scratch!; { cleanup accept cache.
LINE #MENULINE,#MENUCOL; { position on "files" menu
ACCEPT INTO scratch; { accept "files" marks.
row := 0; { row in accept cache.
DO BEGIN { Read each row
READ scratch CACHE row, #s, eof; { in accepted cache.
#op := #TAKE #s; { #op is mark for this row.
IF #op<>"" THEN BEGIN { Have a mark for this row.
READ files CACHE menuline1 + row,#z; { Read Files cache to get
#opfile := #TAKE #z; { name of file for this
IF #opfile<>"" THEN BEGIN { marked row (#opfile).
#z := #op & " =>"; { Search for mark #z in
SEARCH MyMenu CACHE - #z { cache. And if line found
LINEFOUND #rule; { #rule will contain line.
IF #rule="" THEN BEGIN { if #rule="" unknown mark
MSG (r) "This mark is an unknown command=" & #op;
RETURN;
END;

{ mark found, pickup the various rules for this command


#prompt:= #rule[ 60:132 ]; { Prompt rule (if any)
waitForOp := 1; { Wait for response, or
IF #rule[5]="." THEN WaitForOp:=0; { . implies don't wait.
#rule := #rule[(#SIZE #z)+2: 59 ]; { #rule = Command Template

HPE NonStop SeeView Manual Page 359 of 365


{parse #rule to see if command requires a prompt
SCAN #rule until "#" -> i;
IF i THEN BEGIN { Rule requires prompt.
IF #response="" OR { If haven't prompted before
(#lastop<>"" AND #op<>#lastop) { or, different operation
THEN BEGIN { prompt user for info.
CALL ask ( #prompt ); { Do waited dialogue box.
CURSOR fkrow,fkcol; { Put cursor back.
IF #parm="" THEN BEGIN { if no input then
MSG "Escape."; { escape.
RETURN;
END;
#response := #parm; { save prompt #response
END;
#rule := #rule[1:i-1] { fold response into command
& #response { at prompt insertion point.
& #rule[i+1:132];
END;
{-------------------------------------------------------}
{ 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.

IF #op="P" THEN BEGIN { if purge operation


ERASELINE; { erase file on screen
WRITE files CACHE { and in cache
menuline1+row UPDATE,"";
END;
FLUSH;
#lastop:=#op; { remember last op
END;
END;
row:=row+1; { increment row to check.
END UNTIL eof;

IF #lastop="" THEN BEGIN { if no operation marks


CALL FileOp(#File,"INFO ^,DETAIL"); { do INFO <file>,DETAIL
END;

?PROC ask{#prompt,row,col}
{------------------------}
{ This proc implements a modal WAITED dialogue box.
{ The proc forces a response to #prompt and returns
{ the result in the global string variable #parm.
{
{ Notice that a WAITED accept is performed and that the accept
{ "insists" that the FKEY be pressed while the cursor is positioned
{ within ASK prompt.
{
{ Note that the user can escape this "mode" by pressing F16.
{-----------------------------------------------------------}
PARM #prompt { msg to display with prompt
, row := 1 { row of prompt
, col := #menucol + #menuwidth { column of prompt
, accepted { flag if accept ok

HPE NonStop SeeView Manual Page 360 of 365


;
LINE row,col; { Display prompt
WINDOW MyMenu MENU
GLASS CACHE /[ / FOR 1 SIZE 80
HEAD #prompt & " (F16 to escape)";
MSG (r) #prompt;
DO BEGIN { accept fkey & parm
FLUSH;
ACCEPT #parm FKEY;
IF (#FKEYLINE=row+1) and (#FKEYCOL>=col) { Cursor in prompt area
THEN BEGIN { when Fkey pressed.
accepted := 1;
END ELSE
BEGIN { Cursor not in prompt
MSG(r) "You must respond to " & #prompt; { when Fkey pressed.
BELL;
accepted := 0;
END;
END UNTIL accepted or #FKEY=16;
IF #FKEY=16 THEN #parm :=""; { escape
CW row,col,1,1; { clear prompt
UNLOCK; { 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.
{
{ If wait = 0 (note default is wait=1) then the operation is displayed
{ without waiting for a response from the task doing the operation.
{------------------------------------------------------------------}
PARM #file { file to do command against
, #command { file inserted at ^ in #command
, wait := 1 { wait for window to fill
;
VAR i { where to ^ insert file
,#filename := #subvol &"."& #file { full filename
,#op { full #command with #filename
;
SCAN #command until "^" -> i;
IF NOT i THEN { if no ^ in command then
i := #SIZE #command+1; { insert #file after command
#op := #command[1:i-1] & #filename & #command[i+1:132];

MSG (r) #take #op & " " & #filename; { display op being performed
BESIDE;
IF wait THEN WINDOW fup,#op NOFRAME NOCURSOR {wait for window to fill
ELSE WINDOW fup,#op NOFRAME NOCURSOR CACHE LASTPAGE EOFONLY;

?SECT SubvolPrompt
{-----------------}
{ This section is executed when the script is first invoked, it:
{
{ 1) Declares global variables #SUBVOL and #PARM.
{ 2) Pops up a prompt asking user to "Enter Subvol."
{--------------------------------------------------}

HPE NonStop SeeView Manual Page 361 of 365


VAR #subvol := #volsub { Global subvolume
,#parm { Global scratch var
;
PAGE 2; { On page 2,
CLEARW; { delete all windows.

WINDOW MyMenu MENU CACHE /#subvol/ FOR 1 { Display


SIZE 23 GLASS { "Enter Subvol" prompt.
HEAD "Enter Subvol";

HPE NonStop SeeView Manual Page 362 of 365


Appendix D: PCT.INI
Recommendations
These PCT.INI file settings are suggested for a PC that is using the SeeView program
with the HPE EM6530 PCT terminal emulator:
COLOR_MAPPING=ON (if a color monitor is attached)
UNDERLINE_MAPPING=OFF
NORMAL_INTENSITY=LOW
CURSOR_TYPE=BLOCK
HPE 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.

HPE NonStop SeeView Manual Page 363 of 365


Appendix 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 . 46 Period Y 89 Upper Y
Eot 4 End transmit / 47 Right slash Z 90 Upper Z
Enq 5 Enquiry 0 48 Zero [ 91 Left bracket
Ack 6 Acknowledge 1 49 One \ 92 Back slash
Bel 7 Bell 2 50 Two ] 93 Right bracket
Bs 8 Backspace 3 51 Three ^ 94 Circumflex
Ht 9 Horizontal tab 4 52 Four _ 95 Underscore
Lf 10 Line feed 5 53 Five ` 96 Grave accent
Vt 11 Vertical tab 6 54 Six a 97 Lower a
FF 12 Form Feed 7 55 Seven b 98 Lower b
Cr 13 Carriage return 8 56 Eight c 99 Lower c
So 14 Shift out 9 57 Nine d 100 Lower d
Si 15 Shift in : 58 Colon e 101 Lower e
Dle 16 Data link esc ; 59 Semicolon f 102 Lower f
Dc1 17 Dev control 1 < 60 Less than g 103 Lower g
Dc2 18 Dev control 2 = 61 Equal h 104 Lower h
Dc3 19 Dev control 3 > 62 Greater than i 105 Lower i
Dc4 20 Dev control 4 ? 63 Question j 106 Lower j
Nak 21 Negative ack @ 64 At sign k 107 Lower k
Syn 22 Sync idle A 65 Upper A l 108 Lower l
Etb 23 End of Xmit blk B 66 Upper B m 109 Lower m
Can 24 Cancel C 67 Upper C n 110 Lower n
Em 25 End of medium D 68 Upper D o 111 Lower o
Sub 26 Substitute E 69 Upper E p 112 Lower p
Esc 27 Escape F 70 Upper F q 113 Lower q
Fs 28 File separator G 71 Upper G r 114 Lower r
Gs 29 Group " H 72 Upper H s 115 Lower s
Rs 30 Record " I 73 Upper I t 116 Lower t
Us 31 Unit " J 74 Upper J u 117 Lower u
Sp 32 Space K 75 Upper K v 118 Lower v

HPE NonStop SeeView Manual Page 364 of 365


! 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 paren T 84 Upper T 127 Delete
* 42 Asterisk U 85 Upper U

HPE NonStop SeeView Manual Page 365 of 365

You might also like