SeeView Manual

Sample Script
HP NonStop SeeView Manual526355-004
C-2
?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
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.