View previous topic :: View next topic
|
Author |
Message |
sudhaaa
New User
Joined: 24 Mar 2005 Posts: 51
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
sudhaaa
New User
Joined: 24 Mar 2005 Posts: 51
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
|