Unlike CLIST, REXX is tricky for handling subcommands and prompt responses, 
which need to be QUEUEd (or PUSHed) onto the stack before the main command is 
issued. This can be problematic when the response cannot be known in advance of 
issuing the command. For example, the data set name to use for RECEIVE may 
depend on the data set XMITted. One solution might be to issue RECEIVE, trap 
the output that contains the data set name, and END without actually receiving 
the data set. Then construct a prompt response based the known data set name, 
QUEUE the appropriate response, and issue RECEIVE again. Might be undoable if 
more than one data set is waiting for RECEIVE.

.
.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler 
SHARE MVS Program Co-Manager
626-302-7535 Office
323-715-0595 Mobile
[email protected]

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of John McKown
Sent: Tuesday, November 17, 2015 10:45 AM
To: [email protected]
Subject: (External):Re: Fastest way to read OLDEST GDG entry

Some example REXX which might be of some help:

/* REXX */
X=OUTTRAP("OUT.","*");
"LISTC ENT('gdg.base.name') ALL"
X=OUTTRAP("OFF")
DSN='?'
DO I=1 TO OUT.0
   IF 'NONVSAM-' <> LEFT(STRIP(OUT.I,'L'),8) THEN ITERATE
   DSN=WORD(TRANSLATE(OUT.I,' ','-'),2)
   LEAVE
END
IF DSN='?' THEN EXIT(12) /* NO DSN FOUND */ "RECEIVE INDATASET('"DSN"')"

​I recall that doing a RECEIVE in REXX is "iffy". Perhaps another person 
remembers how to do this?​


-- 

Schrodinger's backup: The condition of any backup is unknown until a restore is 
attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to