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

Need to check for existance of a MEMBER (given) in a PDS


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

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Mon Dec 20, 2004 12:50 pm
Reply with quote

Hi All,

I have one requirement in JCL. I need to check for existance of a MEMBER (given) in a PDS. This i have to do in JCL using utilities or without. Please any one can help me by sending the JCL.

Thanks,
Reddy.
Back to top
View user's profile Send private message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Mon Dec 20, 2004 4:39 pm
Reply with quote

Hi All,

I found an indirect way and solved my problem. that is in 2 steps...

1. Write all members list to a sequential file.
2. Search for given member name ( String) in that file.

But I never agree up on this. There must be a straight forward way to do this. I leave it to moderator and other Experts.

Bye,
Reddy.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Jan 09, 2005 10:03 am
Reply with quote

Hi Reddy,

This might be too late for your purposes, but you could probably use sort copy (1 rec). I'm pretty sure SORT accepts PDS members as I/P (you can use a temp D/S as O/P.)

If the step returns a non-zero RC the member doesn't exist.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Jan 09, 2005 10:05 am
Reply with quote

A DUMMY O/P is a better choice here.
Back to top
View user's profile Send private message
sundaresanjs

New User


Joined: 29 May 2006
Posts: 18
Location: USA

PostPosted: Sun Jun 04, 2006 10:00 am
Reply with quote

hi friend,

you can do it with using IEBGENER utility,

for example let us take a pds EXAMPLE.PDS
and in that we want to search for member AAA.

for this we can use this program

Code:
//job.........
//step1 exec pgm=IEBGENER
//sysut1 dd dsn=EXAMPLE.PDS(AAA),disp=SHR
//sysut2 dd dsn=aaa.ps,disp=(NEW,DELETE,DELETE),
  DCB=(LREC=80,BLKSIZE=800,FB),space=(trk,(3,3),Rlse)
//sysout dd sysout=*
//sysprint dd sysout=*
//sysin dd dummy

comment if any errors,

Regards,
Back to top
View user's profile Send private message
philipraju
Warnings : 1

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Sun Jun 04, 2006 4:13 pm
Reply with quote

First Problem:
Go to 3.14 Option,list all the pds with myid.myapplication.*
and then issue " Member memname",
we will gets the PDS name.


If any corrections.....pls
Back to top
View user's profile Send private message
sundaresanjs

New User


Joined: 29 May 2006
Posts: 18
Location: USA

PostPosted: Sun Jun 04, 2006 7:07 pm
Reply with quote

hi friend,

in my code if you run it and get maxcc = 0 then the member is present orelse the member is not present.

thanks

Regards,
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 SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts How to check whether who renamed the ... JCL & VSAM 3
No new posts No ++JCLIN, APPLY CHECK job JCL & VSAM 1
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top