Seadch member name in PDS



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Seadch member name in PDS

Postby aditya.vartak » Thu Jun 24, 2010 12:32 pm

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.
aditya.vartak
 
Posts: 8
Joined: Wed Jun 09, 2010 12:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Seadch member name in PDS

Postby expat » Thu Jun 24, 2010 12:41 pm

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.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Seadch member name in PDS

Postby aditya.vartak » Thu Jun 24, 2010 4:00 pm

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.
aditya.vartak
 
Posts: 8
Joined: Wed Jun 09, 2010 12:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Seadch member name in PDS

Postby Robert Sample » Thu Jun 24, 2010 5:13 pm

I am not aware of any utility that will do what you want.

SAS can handle this but not all sites have SAS installed.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Seadch member name in PDS

Postby expat » Thu Jun 24, 2010 5:41 pm

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.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Seadch member name in PDS

Postby Anuj Dhawan » Fri Jun 25, 2010 6:30 pm

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.
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: Seadch member name in PDS

Postby dick scherrer » Sat Jun 26, 2010 1:54 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post