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
 

 

Copy identical records of PS1 & PS2 to PS3

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

New User


Joined: 07 May 2005
Posts: 9
Location: Duluth, US

PostPosted: Wed Oct 12, 2005 8:28 am    Post subject: Copy identical records of PS1 & PS2 to PS3
Reply with quote

i am having 2 ps say PS1 & PS2, both are having 10 records each, but in that records 3 are identical in both ps,now i want to copy that identical records to another ps say PS3 only through JCL. Can anyboby help me plz?
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Wed Oct 12, 2005 12:45 pm    Post subject: Re: jcl
Reply with quote

Hi,

Quote:
i want to copy that identical records to another ps say PS3 only through JCL


Try following code, you will get all identical records in PS3.


Code:
//PSTEP01      EXEC PGM=SORT
//SORTIN        DD DSN=PS1,DISP=shr
//                   DD DSN=PS2,DISP=shr
//SORTOUT     DD DSN=<output dataset-1>,
//                   DISP=(new,catlg,delete)
//SORTXSUM   DD DSN=PS3
//                   DISP=(new,catlg,delete)
//SYSIN           DD *
                      SORT FIELDS=(1,10,CH,A)
                      SUM  FIELDS=NONE,XSUM
/*
//SYSOUT        DD SYSOUT=*
//SYSUDUMP    DD SYSOUT=*


Hope this helps

Regards

Rupesh
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Oct 12, 2005 8:04 pm    Post subject:
Reply with quote

Quote:
3 are identical in both ps,now i want to copy that identical records to another ps say PS3


It's not clear what you want to do for the 3 identical records. Do you want to copy all 3 records to PS3, or do you want to copy just the second and third record (but not the first) to PS3, or what? Are there matches and non-matches between PS1 and PS2? If so, what do you want to do about the matches and non-matches? Are there matches within PS1 or PS2? If so, what do you want to do about the matches within each file?

Please show an good example of the records in each input file and what you want the output file (or files?) to look like. Don't make us guess what you want.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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