IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Rexx code for finding out generations of a GDG


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Zubbu

New User


Joined: 18 Oct 2007
Posts: 1
Location: Hyderabad

PostPosted: Fri Oct 19, 2007 4:33 pm
Reply with quote

Can anybody provide me the Rexx code for the following requirement.

If we give the GDG base name then all available genrstions of that particular GDG file should should be written to an output file.

Ex: when I Give TY205.TEST.GDG and it has 3 generations say

TY205.TEST.GDG.G0001V00
TY205.TEST.GDG.G0002V00
TY205.TEST.GDG.G0003V00

Then the Output file should contain.

TY205.TEST.GDG
TY205.TEST.GDG.G0001V00
TY205.TEST.GDG.G0002V00
TY205.TEST.GDG.G0003V00
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Oct 19, 2007 4:42 pm
Reply with quote

See any of these previous topics:

ibmmainframes.com/viewtopic.php?t=23862
ibmmainframes.com/viewtopic.php?t=24353
ibmmainframes.com/viewtopic.php?t=24879
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Oct 20, 2007 12:44 am
Reply with quote

Code:

//DDNAME DD DISP=SHR,DSN=gdg_name

Jcl will treat Your dsn specification as if You ad concatenated all
the gdg versions

//DDNAME DD DISP=SHR,DSN=gdg_name(0)
//       DD DISP=SHR,DSN=gdg_name(-1)
//       DD DISP=SHR,DSN=gdg_name(-2)
//       DD DISP=SHR,DSN=gdg_name(...)
//       DD DISP=SHR,DSN=gdg_name(...)
//       DD DISP=SHR,DSN=gdg_name(-n)


so no need to use additional tools to achieve what You want

Code:

//GENRSTEP EXEC PGM=IEBGENER
//SYSPRINT   DD SYSOUT=*
//SYSIN      DD DUMMY
//SYSUT1     DD DISP=SHR,DSN=gdg_base_name
//SYSUT2     DD DISP=(NEW....)
//              DSN=all_gdg_data,
//              allocation_parameters


the jcl above with the obvious adjustment will accumulate all the
versions of a gdg in a single dataset
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top