IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

want to find the GDG name in my JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 51
Location: India

PostPosted: Wed May 03, 2006 2:40 pm
Reply with quote

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 icon_question.gif
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed May 03, 2006 3:31 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed May 03, 2006 4:06 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Find the occurrence of Key Field (Par... DFSORT/ICETOOL 6
No new posts Find a record count/numeric is multip... COBOL Programming 1
No new posts Need to find a specific STRING COBOL Programming 11
Search our Forums:

Back to Top