SeeView Manual

Sample Script
HP NonStop SeeView Manual526355-004
C-7
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."
{--------------------------------------------------}
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";