How to find latest GDG using REXX???



IBM's Command List programming language & Restructured Extended Executor

How to find latest GDG using REXX???

Postby Balamurugan3 » Thu Feb 11, 2010 7:39 pm

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 ?
Many Thanks,
Bala
Balamurugan3
 
Posts: 17
Joined: Tue Sep 29, 2009 11:23 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby MrSpock » Thu Feb 11, 2010 8:26 pm

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?
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

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

Postby Balamurugan3 » Fri Feb 12, 2010 12:43 pm

Thx for the reply Mr.Spock
Many Thanks,
Bala
Balamurugan3
 
Posts: 17
Joined: Tue Sep 29, 2009 11:23 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby enrico-sorichetti » Fri Feb 12, 2010 2:20 pm

investigate the use of BPXWDYN!
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post