View previous topic :: View next topic
|
Author |
Message |
ovreddy
Active User
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
|
|
|
|
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 |
|
|
ovreddy
Active User
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
A DUMMY O/P is a better choice here. |
|
Back to top |
|
|
sundaresanjs
New User
Joined: 29 May 2006 Posts: 18 Location: USA
|
|
|
|
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 |
|
|
philipraju Warnings : 1 New User
Joined: 16 Apr 2006 Posts: 29
|
|
|
|
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 |
|
|
sundaresanjs
New User
Joined: 29 May 2006 Posts: 18 Location: USA
|
|
|
|
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 |
|
|
|