Page 1 of 1

Seadch member name in PDS

PostPosted: Thu Jun 24, 2010 12:32 pm
by aditya.vartak
Hi,

I have a following requirement

Serach members in PDS1, If present then do nothing, If not present then copy those members from PDS2 to PDS1.
I am using IEBCOPY utility to copy the members from PDS2 to PDS1.

Generally what i do to search member is type "m <member name>" on command line and it will give me in what all PDS's this member is present like following -

Command ===> m AAABDBLC Scroll ==

Command - Enter "/" to select action Message
-----------------------------------------------------------------------
XXX.XXX.XXX.X1 Member: AAABDBLC
XXX.XXX.XXX.X2 Migrated
XXX.XXX.XXX.X3
XXX.XXX.XXX.X4 Member: AAABDBLC
XXX.XXX.XXX.X5 Member: AAABDBLC


I have 100's of such members to serach and then copy. Can someone give me Syntax for the same ?
Note that : 3.14 /15 is used to search "strings" But I want to search member name is present in PDS or not.

Re: Seadch member name in PDS

PostPosted: Thu Jun 24, 2010 12:41 pm
by expat
If you have a list of members then use that in IEBCOPY, being careful NOT to specify the replace option.
If the member exists in PDS1 then IEBCOPY will skip that member, if not IEBCOPY will copy it.

Re: Seadch member name in PDS

PostPosted: Thu Jun 24, 2010 4:00 pm
by aditya.vartak
yup... but how can I search member name in a PDS ? I think, you get my question wrong.
I have 100 members to search in a PDS. I used search like above "m <member name>" . But for 100 members that's too much of manual efforts. So I would like to have jcl syntax to search member name in a pds.

Re: Seadch member name in PDS

PostPosted: Thu Jun 24, 2010 5:13 pm
by Robert Sample
I am not aware of any utility that will do what you want.

SAS can handle this but not all sites have SAS installed.

Re: Seadch member name in PDS

PostPosted: Thu Jun 24, 2010 5:41 pm
by expat
REXX can do this in batch, but once again ..............................

If you code your IEBCOPY job correctly, all you need to do is to run the job and it will know if the member names already exist or not in the target PDS, and copy ONLY those members that DO NOT exist in the target PDS.

Re: Seadch member name in PDS

PostPosted: Fri Jun 25, 2010 6:30 pm
by Anuj Dhawan
probably you can try this:
    1. Create a data-set which have all the member names from PDS.
    2. In one step, search the above created DSN for the member name. Use, SuperC or something you are comfortable with.
    3. Based upon the RC from point-2 , execute IEBCOPY step.

Re: Seadch member name in PDS

PostPosted: Sat Jun 26, 2010 1:54 am
by dick scherrer
Hello,

Strongly suggest that you make a copy of any dataset that is part of this for testing. . .

Once the process does what you want and does not destroy anything, backup the xisting datasets and run for real.