Tried issuing an alloc command when I call a rexx program. But, it doesn't pick up the second line for lrecl and blocksize as seen in the code below. Do you have anything in the OPS samplib to use for an example or can you tell me how to concat the two lines?
This code doesn't pick up line 2 , do I need a coma?
DSN = "SSXXX.XXXXXXXX.TEST"
"ALLOC F(PROCAB) NEW DSN(" || DSN || ") "
"LRECL(80) RECFM(FB) UNIT=(3390) TRACKS SPACE (5,5) CATALOG "
"FREE F(PROCAB)"
exit
This code below fails at run time
DSN = "SSXXX.XXXXXXXX.TEST"
"ALLOC F(PROCAB) NEW DSN(" || DSN || ") ||
LRECL(80) RECFM(FB) UNIT=(3390) TRACKS SPACE (5,5) CATALOG "
"FREE F(PROCAB)"
exit
The code was missing a comma, had an incorrect "=" in the UNIT keyword and had "F B" together in the RECFM keyword.
Try this code:
DSN = "SSXXX.XXXXXXXX.TEST"
"ALLOC F(PROCAB) NEW DSN(" || DSN || ") ",
"LRECL(80) RECFM(F B) UNIT(3390) TRACKS SPACE (5,5) CATALOG "
DO QUEUED()
PULL LINE
SAY LINE
END
"FREE F(PROCAB)"
EXIT
It is a good practice to read the EDQ after TSO commands so that you can see the error messages that are being produced. See the code added the DO QUEUED() section to read and display the EDQ.