tempuser Beginner
Joined: 05 Oct 2005 Posts: 28 Topics: 20 Location: INDORE
|
Posted: Wed Feb 13, 2008 2:46 pm Post subject: How can we create summary report thru SYNCSORT |
|
|
Hi,
I am having 2 files of length 100 with FB format.The requirement is
1)Match the files,create a file with the matched records and the count at the end.
2)Match the files,create a file with the un-matched records from file 2 and the count at the end.
3)Create a file with the total number of records in the file 2 and matched record count and un matched record count.
Here is the JOIN statments that I am using to develope the first 2 requirements.
Code: |
//PS020 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//CTL1JNF1 DD FILE 1
//CTL1JNF2 DD FILE 2
//CTL2JNF1 DD FILE 1
//CTL2JNF2 DD FILE 2
//CTL1OF01 DD SYSOUT=*
//CTL2OF01 DD SYSOUT=*
//TOOLIN DD *
SORT FROM(CTL1JNF1) USING(CTL1)
SORT FROM(CTL1JNF1) USING(CTL2)
//CTL1CNTL DD *
JOINKEYS FILES=F1,FIELDS=(1,100,A)
JOINKEYS FILES=F2,FIELDS=(1,100,A)
JOIN UNPAIRED,F2,ONLY
REFORMAT FIELDS=(F2:1,100)
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,100),REMOVECC,
TRAILER1=(30X,C'POL COUNT ',COUNT=(M11,LENGTH=8))
//CTL2CNTL DD *
JOINKEYS FILES=F1,FIELDS=(1,100,A)
JOINKEYS FILES=F2,FIELDS=(1,100,A)
REFORMAT FIELDS=(F2:1,100)
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,100),REMOVECC,
TRAILER1=(30X,C'POL COUNT ',COUNT=(M11,LENGTH=8))
/*
|
I am not able to get the file 3 with out using the temp files or aother step.
Any thoughts.
Thanks
Tempuser |
|