Lizette Koehler wrote:

>1) Identify the GDG base and what the To/From GDG Numbers are.  I cannot use 
>Relative numbers as GDGs are always being created, so when the program starts 
>I want just the ones created at that time this program begins to execute. 

You have gotten good replies (CSI, LISTC, BPXWDYN, etc.) You can even call 
DFSORT from COBOL to sort your LISTC / CSI output according to the version and 
generation.

One question has not been answered: 
Who will be creating that new GDG version? If that creator is another job, note 
that, AFAIK, the new GDG will only be cataloged at end of the JOB or STEP. You 
may end up (re)reading the second oldest or second youngest GDG in a second run.


>//S1  EXEC PGM=X,PARM='GDGBASE'

Or rather, use a DD statement as parameter if you have many GDGBASE to process.


>Write to Report Repository
>Rename the GDG - this is only done as a precaution.

I would suggest that you ensure that the dataset is freed / un-allocated 
(BPXWDYN is very useful here) after the write and before the rename.


>The GDG reports can be from 1 line to millions of lines.  No way to know until 
>the file is read.

LISTC or CSI can show you how big the dataset is. Granted, these info is 
estimate, but could give you a start.

Good luck!

Groete / Greetings
Elardus Engelbrecht

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

Reply via email to