Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I do this with REXX?

Status
Not open for further replies.

nxm150

Programmer
May 22, 2002
78
US
This is for the mainframe.

I have coded extensively in CLIST but not REXX. Can someone tell me if this can be accomplished with REXX?
I have a COBOL job (job1) that writes out to a flat file, most of the times with mutlipe VOLSER's. I then have a 2nd job that reads the file created by job1. Before running job2, I want to verify that the VOLSERs created by job1 are all still cataloged to the dataset. Job2 sometimes will run several months after job1.
 
REXX will basically do everything CList does, just differently and often (not always) better. You might want to look at the LISTDSI command in REXX (and CList for that matter) which will tell you volume names.

I must admit I haven't done much with multi-volume datasets so I don't recall if LISTDSI will list all volumes.

Worst comes to worst you can just trap output from a LISTD command;

Call Outtrap 'OUT.'
"ListD 'MY.DATA.SET'"
Call Outtrap 'OFF'
do i = 1 to OUT.0
say OUT.i
end
 
LISTDSI won't report anything other than the first volume of a multi-volume DS.

But I'm a bit confused. SMS won't let you have an uncataloged dataset any more, so the dataset will either be there or it won't. I can't see how it matters which volumes it's cataloged to, especially if you have HSM, where it could be migrated or moved around over a period of months.

Is it on tape or something?
 
Output files are written to tape.

I just had an instance where tape output file specified CATALOG for the 1st volser and all subsequent VOLSER's specified a 14 RETPD. So I read the file not knowing that I was missing all the VOLSERs besides the first one.
 
Rather than trying to trap the error in your REXX, which is about six weeks too late, you would be better off fixing the RETPD issue caused by job 1...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top