Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Rexx code for finding out generations of a GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Rexx code for finding out generations of a GDG
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

Moderator Team Head


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

PostPosted: Fri Oct 19, 2007 4:42 pm    Post subject: Reply to: Rexx code for finding out generations of a GDG
Reply with quote

See any of these previous topics:

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Sat Oct 20, 2007 12:44 am    Post subject: Reply to: Rexx code for finding out generations of a GDG
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us