View previous topic :: View next topic
|
Author |
Message |
brahmanandarm
New User
Joined: 15 Jun 2009 Posts: 28 Location: bangalore
|
|
|
|
Hi All,
(1)I have a PS of record lenght 8 (Member names)
Record format . . . : FB
Record length . . . : 8
Example of member names
ABCLOAD1
XYZLOAD2
FDALOAD2
ACNDBIND
COMPSORT
SORTJCLD
(2)I have a PDS of Members.
Record format . . . : FB
Record length . . . : 80
Example of PDS members
ABCLOAD1
XYZLOAD2
FDALOAD2
ACNDBIND
COMPSORT
SORTJCLD
I need to compare (1)file(PS) with (2)file(PDS) and write the matched members to (3) New PDS. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
below rexx code will give the members of the pds in stem
Code: |
SRCPDS="yourpdsname"
X = OUTTRAP("MEMLST.")
"LISTDS '"SRCPDS"' MEMBERS"
X = OUTTRAP("OFF")
|
Now you can read first dataset and then copy matching datasets to new PDS. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Sambhaji, I think the OP just wants to compare two lists of member names and write only the names that match to the output. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Kevin wrote: |
Sambhaji, I think the OP just wants to compare two lists of member names and write only the names that match to the output. |
Ohh.I missed that.. Thanks Kevin
Sambhaji wrote: |
Now you can read first dataset and then copy matching datasets to new PDS. |
Should be read as
Quote: |
Now you can read first dataset and then write matching dataset names to new member in PDS. |
|
|
Back to top |
|
|
brahmanandarm
New User
Joined: 15 Jun 2009 Posts: 28 Location: bangalore
|
|
|
|
Hi All,
I am new to Rexx
Can you give the JCL
As stated about
Input
File1_PS: ABC.Members.PS
File2_PDS: ABC.Members.PDS
OPUTPUT:
File3_PDS: ABC.Members.PDS.NEW.
Note: I would need the Matched members to be copied from (File2) to (File3) PDS. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
brahmanandarm, I don't understand why you're talking about REXX. Is there a reason why you can't just create a single IEBCOPY to copy all of the members shown in FILE1 from FILE2 to FILE3. Any unmatched member just won't be copied. |
|
Back to top |
|
|
|