Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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: 10327
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us