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
 

 

Extracting latest generation of each GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Tue Dec 11, 2007 6:39 pm    Post subject: Extracting latest generation of each GDG
Reply with quote

Hi, When I opened USER.ISF.* datset using 3.4, it will list a number of GDG base and generations as below

USER.ISF.GDG1
USER.ISF.GDG1.G0001V00
USER.ISF.GDG1.G0002V00
USER.ISF.GDG2
USER.ISF.GDG2.G0001V00
USER.ISF.GDG2.G0002V00
USER.ISF.GDG2.G0003V00
USER.ISF.GDG3
USER.ISF.GDG3.G0001V00
USER.ISF.GDG3.G0002V00

Now, I need to extract all latest generations to output dataset as below:

USER.ISF.GDG1.G0002V00
USER.ISF.GDG2.G0003V00
USER.ISF.GDG3.G0002V00

Any inputs to do this please.
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: Tue Dec 11, 2007 7:04 pm    Post subject: Reply to: Extracting latest generation of each GDG
Reply with quote

A. If you've already created the dataset list from ISPF 3.4, why not just print it to a dataset and use that as input to your program?

B. Since you already know how to retrieve the information you want using ISPF 3.4, why not call the same ISPF Services that 3.4 uses in your program?

LMDINIT.

LMDLIST.

LMDFREE.

C. There's always LISTCAT.
Back to top
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Tue Dec 11, 2007 7:59 pm    Post subject:
Reply with quote

Hey Guys, I am really sorry that this is not my query, I have a requirement to code REXX to extract all latest generations into output dataset, and this will be an ongoing process. My requirement is to do using REXX only
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: Tue Dec 11, 2007 8:12 pm    Post subject:
Reply with quote

sudhaaa wrote:
My requirement is to do using REXX only


What do you mean by "REXX only"? Do you mean that you can't use TSO commands, ISPF services, or even standard MVS utilities? If that's what you mean, then you can't do this with REXX, as it has no built-in functions to do what you're asking.

Unless, you're talking about a simple batch process:

Code:

//STEPXXXX EXEC PGM=IRXJCL,PARM='DOIT'
//SYSEXEC DD DISP=SHR,DSN=HLQ.REXX
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//IN1 DD DISP=SHR,DSN=USER.ISF.GDG1(0)
//IN2 DD DISP=SHR,DSN=USER.ISF.GDG2(0)
//IN3 DD DISP=SHR,DSN=USER.ISF.GDG3(0)
//OUT DD DSN=USER.ISF.COMB,DISP=(MOD,CATLG,DELETE),...


Code:

/* REXX DOIT */
Do Forever
  "EXECIO 1 DISKR IN1"
  If rc <> 0 Then Leave
  Pull therec
  Push therec
  "EXECIO 1 DISKW OUT"
End
"EXECIO 0 DISKR IN1 (FINIS"
Do Forever
  "EXECIO 1 DISKR IN2"
  If rc <> 0 Then Leave
  Pull therec
  Push therec
  "EXECIO 1 DISKW OUT"
End
"EXECIO 0 DISKR IN2 (FINIS"
Do Forever
  "EXECIO 1 DISKR IN3"
  If rc <> 0 Then Leave
  Pull therec
  Push therec
  "EXECIO 1 DISKW OUT"
End
"EXECIO 0 DISKR IN3 (FINIS"
"EXECIO 0 DISKW OUT (FINIS"
Exit 0


Of course, WHY would you want to do it this way?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 13, 2007 12:52 am    Post subject:
Reply with quote

Take a look at the example in SYS1.SAMPLIB(IGGCSIRX).

The manual is in the SMS bookshelf and is called "Managing Catalogs"

Everything that you need will be there.
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 SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts Extracting Information from DD Statem... Charles Wolters All Other Mainframe Topics 7 Wed Apr 13, 2016 10:21 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am


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