Figure 2-6. Retrieving Disk Names From Dsap - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

Use the macro in Figure 2-6, volnames, to display the volume names on your system,
using the VFIND global editing command. To run this macro, load the file and type
volnames:
12> volnames
The volume names are:
$SYSTEM
$DATA
$DATA2
$DATA3
13>
This macro uses the OUTV construct to retrieve process output. For more information
about OUTV, see "Using INV and OUTV" in Section 5, "Initiating and Communicating
With Processes."

Figure 2-6. Retrieving Disk Names From DSAP

?SECTION volnames MACRO
#FRAME
[#PUSH
dsapoutput
diskpaths
diskinfo
volname
displayinfo
count
begin
end
]
== Run DSAP and capture the output:
DSAP /OUTV dsapoutput/ *, SHORT
VFIND /QUIET, TO diskpaths/ dsapoutput "$"
== Set a stack counter for diskpaths
#SET count [#LINECOUNT diskpaths]
==
Loop through the contents of diskpaths
[#LOOP |WHILE| [count] <> 0 |DO|
==
Extract a line and put it in diskinfo
#SET diskinfo [#EXTRACT diskpaths]
==
Get values for the positions of the "$" and "-"
==
characters
#SETMANY volname, [diskinfo]
#APPENDV displayinfo volname
#SET count [#COMPUTE [count] - 1]
]
#OUTPUT The volume names are:
#OUTPUTV displayinfo
#UNFRAME
107365 Tandem Computers Incorporated
== an output stack for DSAP
== a stack of disk names
== a single line from DSAP
== a volume name
== a stack of volume names to display
== a stack counter
== beginning of the volume name
== end of the volume name
Developing TACL Programs
Processing Character Data
2–15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents