Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 49
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: 4650
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 Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us