Page 1 of 1

How to find latest GDG using REXX???

PostPosted: Thu Feb 11, 2010 7:39 pm
by Balamurugan3
I have an requirement where i need to read the last GDG number...

I tried using XXX.XXX.XXX(0)
in the below format...

"ALLOC F(INPUT) DA('XXX.XXX.XXX(0)') SHR "
"EXECIO * DISKR INPUT (STEM LINE. FINIS"
"FREE F(INPUT)"

But i am geting an error message like

IKJ56709I Invalid DATASET NAME 'XXX.XXX.XXX(0)'
IKJ56701I MISSING DATA SET NAME OR *+
IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED

Can anyone help me in suggesting a way to find the last GDG version number present ? Or is there any way to be represented to read the last version ?

Re: How to find latest GDG using REXX???

PostPosted: Thu Feb 11, 2010 8:26 pm
by MrSpock
This is not a REXX issue, since REXX has nothing to do with dataset allocations and whatnot. Furthermore, the concept of GDG processing and management is exclusive to the realm of batch processing. If this GDG is being used in a batch job, then you should have no problem determining the current generation since that will be the (0) relative generation as of run-time.

But, to simply answer your question, I'll ask another question:

Not considering REXX, how would you normally determine this information?

Updated:

Have you already reviewd the information shown in this topic?

Re: How to find latest GDG using REXX???

PostPosted: Fri Feb 12, 2010 12:43 pm
by Balamurugan3
Thx for the reply Mr.Spock

Re: How to find latest GDG using REXX???

PostPosted: Fri Feb 12, 2010 2:20 pm
by enrico-sorichetti
investigate the use of BPXWDYN!