Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Compare PS and PDS and write Matched members to a PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
brahmanandarm

New User


Joined: 15 Jun 2009
Posts: 28
Location: bangalore

PostPosted: Mon Mar 15, 2010 2:48 pm    Post subject: Compare PS and PDS and write Matched members to a PDS
Reply with quote

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
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Mar 15, 2010 3:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Mon Mar 15, 2010 3:14 pm    Post subject: Reply to: Compare PS and PDS and write Matched members to a
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Mar 15, 2010 3:35 pm    Post subject: Re: Reply to: Compare PS and PDS and write Matched members t
Reply with quote

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
View user's profile Send private message
brahmanandarm

New User


Joined: 15 Jun 2009
Posts: 28
Location: bangalore

PostPosted: Mon Mar 15, 2010 4:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Mon Mar 15, 2010 4:14 pm    Post subject: Reply to: Compare PS and PDS and write Matched members to a
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us