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

Existence of a member in a PDS


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

New User


Joined: 30 Jan 2008
Posts: 8
Location: chennai

PostPosted: Fri Feb 08, 2008 11:56 am
Reply with quote

Hi,

please let me know if anyone knows how to find an existence of a member in a PDS? How to code it in JCL?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Feb 08, 2008 12:51 pm
Reply with quote

I would recommend using REXX's SYSDSN function and set a return code appropriately.

O.
Back to top
View user's profile Send private message
rehanaaigss

New User


Joined: 30 Jan 2008
Posts: 8
Location: chennai

PostPosted: Fri Feb 08, 2008 2:14 pm
Reply with quote

I have heard of using GETPDS in JCL to find out the existence of a member in a PDS. But not sure how to make use of this? Can anyone please help me in this?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 08, 2008 3:19 pm
Reply with quote

Have you investigated the use of IDCAMS PRINT ?

You get RC12 if the member does bot exist
Back to top
View user's profile Send private message
rehanaaigss

New User


Joined: 30 Jan 2008
Posts: 8
Location: chennai

PostPosted: Fri Feb 08, 2008 5:03 pm
Reply with quote

Can u please tell me how to code it using IDCAMS PRINT ? if member exists, what will happen?
Back to top
View user's profile Send private message
rehanaaigss

New User


Joined: 30 Jan 2008
Posts: 8
Location: chennai

PostPosted: Fri Feb 08, 2008 7:11 pm
Reply with quote

If a particual member(job) exists in a PDS, that job has to be excuted; otherwise control has to come out.. How can i code this in JCL?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 08, 2008 7:25 pm
Reply with quote

Here is the link to the IDCAMS manual, so take a look at the PRINT command.

http://publib.boulder.ibm.com/cgi-bin/bookmgr/FINDBOOK?filter=access+method+services&Collection=0

How do you code what you want - execute, or not, the second step depending on the condition returned from the IDCAMS PRINT step.
Back to top
View user's profile Send private message
rehanaaigss

New User


Joined: 30 Jan 2008
Posts: 8
Location: chennai

PostPosted: Tue Feb 12, 2008 5:26 pm
Reply with quote

Hi,

I made use of 'LISTDS' to findout the availability of a member in a PDS. It is working fine.

Thanks for all........
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Feb 12, 2008 6:10 pm
Reply with quote

Hi rehanaaigss,

Thanks for sharing this. It would be great if u post the JCL also.

Cheers
Agni.
Back to top
View user's profile Send private message
rehanaaigss

New User


Joined: 30 Jan 2008
Posts: 8
Location: chennai

PostPosted: Tue Feb 12, 2008 6:19 pm
Reply with quote

Here is the JCL:

//P1 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
LISTDS 'T54V01H.TEST.JCL(XXXX)'

If the specified member is not available, RC of this step will be 4. If the specified PDS itself doesn't exist, RC will be 8.
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 How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Looking For a PDS Member Without Open... PL/I & Assembler 10
No new posts Library member auto insert option TSO/ISPF 3
No new posts DataSet member creation failed with B... Java & MQSeries 15
Search our Forums:

Back to Top