CLIST REXX
1. Allocate/concatenate to SYSPROC
2. Specify member name of PDS with or without %
1. Allocate/concatenate to SYSPROC or SYSEXEC
2. Specify member name of PDS with or without %
Interactive Communication
CLIST REXX
Reading from the terminal Reading from the terminal
READ, READDVAL statements
READ INPUTA, INPUTB, INPUTC
PULL, PARSE PULL, PARSE UPPER PULL, PARSE EXTERNAL
instructions
pull inputa, inputb, inputc
Writing to the terminal Writing to the terminal
WRITE statement
WRITE Your previous entry was not valid.
SAY instruction
say 'Your previous entry was not valid.'
Passing Information
CLIST REXX
Receiving parameters in a CLIST Receiving arguments in an exec
PROC statement
PROC 1 DSNAME MEMBER() DISP(SHR)
CLISTs can receive positional, keyword, and
keyword value parameters.
ARG, PARSE ARG, PARSE UPPER ARG instructions
arg dsname member disp
An exec receives positional parameters. Use the PARSE ARG
and PARSE UPPER ARG instructions to receive keywords, for
example:
my.data member(member1) disp(old)
parse upper arg dsname .
parse upper arg 'MEMBER('mem')'
parse upper arg 'DISP('disp')'
Recognizing comments within a parameter Recognizing comments within a parameter
A CLIST PROC statement recognizes a comment
within a parameter sent by the EXEC command
and ignores that comment.
An ARG instruction does not recognize a comment within a
parameter sent by the EXEC command. It is treated as part of the
argument.
Sending parameters to a CLIST Sending arguments to an exec
EXEC command
EXEC MY.CLIST(NEW) -
'MY.DATA MEMBER(MEMBER1) DISP(OLD)'
EXEC command from TSO/E READY
'EXEC MY.EXEC(NEW)',
"'my.data member(member1) disp(old)' EXEC"
Sending information to a subprocedure Sending information to a subroutine
Execution
Appendix C. Comparisons Between CLIST and REXX 201