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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sensing the end of one GDG generation 1

Status
Not open for further replies.

clanebep

Programmer
Jul 13, 2012
3
US
I need to create a program that will read all generations of a GDG and create a single file containing the content of all generations. The JCL will use the base GDG name to include all generations are read.

I know this can be done using EIBGENER but I need to insert a sentinel between the end of one file's content and the beginning of the next file's content.

Does anyone know if there is a way to sense when the end of one of the generations is reached?

Thanks
 
Not easily and not in COBOL . . .

What you might consider is generating a list of all of the dsns in the gdg that are currently active, and generating jcl that names each generation in a concatenation and then interleaving the dataset names with the "sentinel".

Something like:
//SYSUT1 DD DSN=MY.GDG/G0001V00,DISP=whatever
// DD DSN=THE.SENTINEL,DISP=SHR
// DD DSN=MY.GDG.G0002V00,DISP=whatever
// DD DSN=THE.SENTINEL,DISP+SHR
etc
 
Sorrt 'bout the indentation and typo. . .

Couldn't figure out how to make "Code" work. . . And missed the + typo. . .
 
Thanks for the suggestions. Not ideal but it would work.

Problem is that the project is likely to have 1000+ base GDGs and each will have from 84 to 350 generations. Of course your suggestion could be automated by writting a program to generate the code.

Thanks again papaba

 
Yup, i would surely generate the jcl to run these. . .

Good luck!
 
Hi,
I would have thought that this sort of thing is made for REXX. You could run the TSO LISTC command for the GDG that you required and have the output saved to a file. You could then read that list of files in REXX, open each one with an ALLOC statement, read the data and output to a file.

Hope over to the REXX forum and pose the question there. If you're not particularly skilled in REXX, tell them and I'm sure one of the gurus there can help you out.

Marc
 
Do your files not hve headers and trailers as all good files should have?


Nic
 
I would have thought that this sort of thing is made for REXX. You could run the TSO LISTC command for the GDG that you required and have the output saved to a file. You could then read that list of files in REXX, open each one with an ALLOC statement, read the data and output to a file."

As there are many (1000+) gdg bases and who knows how many files containing whatever volume of data, i suspect that REXX would not perform acceptable (it is possibly the worst for copying large amounts of data on the mainframe).


Using the LISTC in REXX could be handy, but i'd have to run some timing tests with a few of the largest files to see how well the REXX copy compares with a copy done by the sort product. The performance should be exponentially better with the sort.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top