Syncsort get unmatched records & Merging of matching records



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Syncsort get unmatched records & Merging of matching records

Postby SLEEPLESS » Thu Jun 27, 2013 12:28 pm

I need a sortcard that will take in 2 input files and give me 3 output files-
output1 - merge record of File 2 in the middle of File 1 record, if matching
output2 - unmatching records of File1
output3 - unmatching records of File2

so the sample output will look like-
File 1-------------File2-File1 **** actual output starts below-
1111111111111 AAAA X
5555555555555 IUYT Z
8888888888888 HRRR Y

I ran a sample sort card that I picked from this forum but it only gives matching(from File1) & unmatching records in two files.
//STEP1 EXEC PGM=SORT
//SORTJNF1 DD *
1111111111111 X
3333333333333 Y
5555555555555 Z
7777777777777 X
8888888888888 Y
//SORTJNF2 DD *
2222222222222 AAAA GGGG
1111111111111 TRRD HDGF
8888888888888 HRRR REDS
9999999999999 JGTF FDES
5555555555555 IUYT WESD
//SORTOF01 DD DSN=MATCHED.RECORDS,DISP=...
//SORTOF02 DD DSN=UNMATCHD.RECORDS,DISP=...
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,15,A)
JOINKEYS FILE=F2,FIELDS=(1,15,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F1:1,65,F2:1,1)
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(66,1,CH,NE,X'40'),BUILD=(1,65)
OUTFIL FILES=02,INCLUDE=(66,1,CH,EQ,X'40'),BUILD=(1,65)
/*

could somebody help plz its very urgent! Thanks
SLEEPLESS
 
Posts: 1
Joined: Thu Jun 27, 2013 11:53 am
Has thanked: 0 time
Been thanked: 0 time

Re: Syncsort get unmatched records & Merging of matching rec

Postby dick scherrer » Sat Jun 29, 2013 12:12 am

Hello and welcome to the froum,

If you are willing to pay the going rate for "urgent" questions, fine. Several here will work for pay. . .

How/why did you decide to use this:
JOIN UNPAIRED,F1
?

Suggest you not just grab "something" and use it without understanding what it really will do.

Read about UNPAIRED and come back if you do not understand what is in the manual.
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 Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post