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: 10256
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am


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