×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Sensing the end of one GDG generation

Sensing the end of one GDG generation

Sensing the end of one GDG generation

(OP)
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

RE: Sensing the end of one GDG generation

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

RE: Sensing the end of one GDG generation

Sorrt 'bout the indentation and typo. . .

Couldn't figure out how to make "Code" work. . . And missed the + typo. . .

RE: Sensing the end of one GDG generation

(OP)
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

RE: Sensing the end of one GDG generation

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

Good luck!

RE: Sensing the end of one GDG generation

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

RE: Sensing the end of one GDG generation

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


Nic

RE: Sensing the end of one GDG generation

(OP)
Thanks to all for your input.

RE: Sensing the end of one GDG generation

"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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close