&BEGSTACK ••• line of data ••• line of data ••• line of data
&END
stack three data lines in the stack. The stacked lines must be followed
by an &END control statement, which must be entered in the EXEC file
beginning in column 1.
If you have an EXEC with fixed-length records, and you want to stack
data lines longer than 72 characters, you must use the ALL operand of
the &BEGSTACK control statement:
&BEGSTACK ALL ••• line of 103 characters ••• line of 98 characters ••• line of 60 characters
&END
The ALL operand is not necessary for variable-length EXEC files. When you are stacking multiple lines in an EXEC, you may choose to
reverse the sequence in which lines are read in from the stack. The
default sequence is PIPO (first-in, first-out), but you may specify LIPO (last-in, first-out) when you enter the &STACK or &BEGSTACK control
statement. Por example, execution of the lines: &STACK &TYPE A &STACK &TYPE B
&STACK LIFO &TYPE C &STACK LIPO &TYPE D &STACK &TYPE E
results in the display:
D
C
A
B
E
The EXEC special variable &READPLAG always contains one of two values, STACK or CONSOLE. When it contains the value STACK, it indicates that
there are lines in the stack. When it contains the value CONSOLE, it
indicates that the stack is empty and that the next read request results
in a physical read to the terminal (console). You can test this value in an EXEC, for example:
&IF &READFLAG EQ STACK &SKIP 2 STIPE STACK EMPTY &EXIT &CONTINUE 290 IBM VM/370 eMS User's Guide
You might use a similar test in an EXEC that processes a number of lines
from the stack, and 100Fs through a series of steps until the stack is empty. STACKING Whenever you place a command in the console stack, it remains there
until a read request is presented to the terminal. If the request is the
result of an SREAD control statement, then the line is read from the
stack. For example, the lines: SSTACK CP QUERY TIME SREAD result in the command line being stacked, read in, and then executed.
If there are no read requests in an EXEC file, then any commands that
are stacked are executed after the EXEC has finished and has returned
contrel to the CMS environment. For example, consider the lines: TYPE S1 LISTING A ACCESS 198 A TYPE S1 LISTING A
If this EXEC is located en your 191 A-disk, then when the ACCESS command
accesses a new A-disk, CMS cannot continue reading the EXEC file and
issues an error message. However, if the EXEC was written as follows: TYPE &1 LISTING A SSTACK ACCESS 198 A
&STACK TYPE &1 LISTING A then, after the TYPE command, the next command lines are stacked, the EXEC finishes executing and returns control to eMS, which reads the next command lines from-the console stack. When you stack commands with the SSTACK control statement in an EXEC procedure, you cannot place multiple command lines in one statement
separated ty the logical line end symbol (for example, print atc listing#print xyz listing). CP does not translate the logical line end
symbol (#) to a value ef x'1S' because a line is being read from the EXEC file en disk and not from the terminal. However, you can place multiple command lines in one statement if separated by the value x'1S'.
The ALTER subcommand of EDIT can be used to insert the x'1S' value. does recognize the x'1S' character.
If you want to issue the EDIT command from within an EXEC, you might
want to stack EDIT subcommands to be read by the editor. You should
stack these subcommands, either with SSTACK statements, or with the SEEGSTACK statement, just before issuing the EDI! command. For example: SBEGSTACK CASE M GET SETUP FILE A 1 20 TOP LOCATE /XX/ SEND SSTACK REPLACE EDIT S1 DATA (LRECL 120 Section 14. Euilding EXEC Procedures 291
Previous Page Next Page