View previous topic :: View next topic
|
Author |
Message |
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
Hi All,
I want to find the GDG name in my JCL and write that to the output file.
For Example,
MYLIB.LIB.TEST is the dataset and the version of the GDG would be 0 and the name is 'MYLIB.LIB.TEST.G0001V00'
How to capture this in a JCL?
Regards,
Muruganandham K |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
I want to find the GDG name in my JCL and write that to the output file. |
Manually ???
You might make a search for "(+" in the job, so whereever in the job a new GDG Generation would be created or referred; it'll take it to there.
Regards,
Priyesh. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use a REXX Exec, running in a TSO address space, to call the LISTDSI function against the DDNAME that is allocated to the GDG.
The format is rc = LISTDSI(DDNAME 'FILE'). If called correctly, the variable SYSDSNAME will contain the name of the corresponding dataset:
Code: |
//JS EXEC PGM=IKJEFT01,PARM='%GETGDG'
//SYSEXEC DD DISP=SHR,DSN=MY.EXEC.LIB
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//MYGDG DD DDN=MYLIB.LIB.TEST(0),DISP=SHR
...
/* REXX GETGDG */
rc = LISTDSI(MYGDG 'FILE')
If rc = 0 Then Say "The dataset name is '"SYSDSNAME"'"
|
|
|
Back to top |
|
|
|