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
 

 

want to find the GDG name in my JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 46
Location: India

PostPosted: Wed May 03, 2006 2:40 pm    Post subject: want to find the GDG name in my JCL
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: 1452
Location: Chicago, IL

PostPosted: Wed May 03, 2006 3:31 pm    Post subject: Re: GDG Name in JCL
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

Moderator Team Head


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

PostPosted: Wed May 03, 2006 4:06 pm    Post subject: Re: GDG Name in JCL
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts how to find clist's or view library Andrew Hsia CLIST & REXX 4 Tue Jun 28, 2016 6:07 pm


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