Examples Of Symbolic Substitution - IBM System 360 User Manual

Operating system: time sharing option terminal
Hide thumbs Also See for System 360:
Table of Contents

Advertisement

'lhe PROC statement indicates that the three symbolic values &INPUT,
&OUTPUT, and &LIST are required, and that the symbolic value &LINES is
optional.
When the user substitutes values for the positional symbolic
values
in
the EXEC command he must provide the values
in
the same order
in
which they appear
in
the FROC statement.
The keyword va lues can
follow the positional values
in
any order.
For example, if the user
wants to replace ALPHA for INPUT, BETA for OUTPUT, COMMENT"for LIS'l', and
20 for LINES, he would enter:
READY
pr39 alpha beta comment lines(20)
In this case, the following substitutions will be made
in
the command
procE::dure:
ALLOCATE DATASET(ALPHA) FILE(INDATA) OLD
ALLOCATE DATASET(BETA) BLOCK(100) SPACE(300,10)
ALLOCATE DATASET(COMMENT) FILE (PRINT)
CALL PROG2 '20'
END
You can also use the PROC statement to assign default values to optional
symbolic values.
That is, if the user fails to provide an actual value
for the symbolic value, the system will use the def ault value to replace
the symbolic value.
You assign a default value by enclosing it
in
parentheses after the symbolic value
in
the PROC statement.
For
example, in the command procedure illustrated above, you may want to
assign 35 as a default value for &LINES.
To do this, enter LINES(3S) in
the PRoe statement.
That is, the PROC statement would be as follows:
PROC 3 INPUT OUTPUT LIST LINES(3S)
If the user enters the following EXEC command:
READY
pr39 alpha beta comment
the following substitutions will
be
made in the command procedure:
ALLOCATE DATASET(ALPHA) FILE(INDATA) OLD
ALLOCATE DATASET(BETA) BLOCK(100) SPACE(300,10)
ALLOCATE DATASET(COMMENT) FILE (PRINT)
CALL PROG2' 35'
END
EXAMPLES OF SYMBOLIC SUBSTITUTION
• positional parameters (These must be specified on the EXEC
statement) •
Here is the procedure statement for a CLIST data set called PR1:
PROC 3 PARMi PARM2 PARM3
If the user enters at the terminal
exec prl 10 20 input
TSO makes the following substitutions within the command
procedure:
10
replaces
20
replaces
INPUT replaces
&
PARMi
&PARM2
&PARM3
84
TSO Terminal User's Guide
(Release 21 .• 7)

Advertisement

Table of Contents
loading

Table of Contents