View previous topic :: View next topic
|
Author |
Message |
maintenure
New User
Joined: 22 Sep 2008 Posts: 10 Location: bangalore
|
|
|
|
Hi
In my shop we are having syncsort product.My requirement is
Input file 1:
111 aaa
222 bbb
222 ddd
333 ccc
444 eee
Input file 2:
111 fff
222 hhh
444 jjj
output:
111 fff
222 hhh
222 hhh
333 ccc
444 jjj
My required output is to write all the records from input 1 and to populate the second column from input 2 only for matching records and write the remaining records as in input 1.
But we dont have icetool.Please suggest a way to do in syncsort.
Thanks
Satheesh |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
The Syncsort Manual wrote: |
The join facility of SyncSort for z/OS provides the capability to join records from two source files. Each record from the first file with a given value in one or more fields (the join key) is joined to each record from the second file that has an identical value in its join key. The joined records are passed to the sort/copy process. The power of this facility is enhanced by the ability to eliminate records from either or both files and to control the disposition of paired and unpaired records resulting from the join operation. |
Try it, you'll like it..... |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Based on the description of your requirement, here is a SyncSort for z/OS job that will provide the requested output:
Code: |
//SORT1 EXEC PGM=SORT
//SORTJNF1 DD *
111 AAA
222 BBB
222 DDD
333 CCC
444 EEE
//SORTJNF2 DD *
111 FFF
222 HHH
444 JJJ
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,3,A)
JOINKEYS FILES=F2,FIELDS=(1,3,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F1:1,7,F2:5,3)
INREC IFTHEN=(WHEN=(8,3,CH,EQ,C' '),BUILD=(1,7)),
IFTHEN=(WHEN=NONE,BUILD=(1,4,8,3))
SORT FIELDS=COPY
/* |
|
|
Back to top |
|
|
maintenure
New User
Joined: 22 Sep 2008 Posts: 10 Location: bangalore
|
|
|
|
Thanks Sir.It is woking fine.Please provide Syncsort manual so that it will useful to me.
Thanks
Satheesh G |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Documentation is available to all licensed SyncSort for z/OS customers. Please contact me offline at alissa.margulies@syncsort.com and provide me with the CPU serial number your company currently has licensed to run SyncSort for z/OS along with your corporate email account and I would be happy to provide you with the requested manuals.
Manuals are also available under special agreement to consultants and developers whose services are being retained by a licensed customer of Syncsort Incorporated. If you are a consultant or outsourced developer, please indicate that in your email. Thank you. |
|
Back to top |
|
|
|