View previous topic :: View next topic
Author
Message
Megha Saravagi New User Joined: 28 Dec 2011Posts: 6 Location: India
Hi friends,
I have an Input file which is being processed in two steps using DFSORT.
1) Input file is being deduped using SUM FIELDS=NONE,XSUM ... which creates two files - Unique File, and Duplicate File.
2) In the 2nd step, main Input file is matched with the Duplicate file (created in above step) using JOINKEY feature of DFSORT.
By any method, is it possible to get the whole task done in single step with use of SYNCSORT/ICETOOL ?
Thanks,
Megha
Back to top
Pandora-Box Global Moderator Joined: 07 Sep 2006Posts: 1592 Location: Andromeda Galaxy
1.Do you have DFSORT installed in your system for sure ? (if yes request you to paste the output messages of STEP1 and STEP2 of your job??
2.What is the purpose of the above step mentioned in quotes??
Megha Saravagi wrote:
1) Input file is being deduped using SUM FIELDS=NONE,XSUM ... which creates two files - Unique File, and Duplicate File.
2) In the 2nd step, main Input file is matched with the Duplicate file (created in above step) using JOINKEY feature of DFSORT.
3.Also I notice you run first step with SYNCSORT and step2 with DFSORT ?
(Looks very weird to me )
4.If my point 3 is true you then both products are installed in your shop
5. If you could explain clearly what you do in step 1 and step 2 and whats the output you need with some sample input and output ( within code tags )
6.Once you explain point 5 please mention the keys for which sorting / JOINKEYS / IDENTIFYING DUPLICATES needs to be done
Back to top
Megha Saravagi New User Joined: 28 Dec 2011Posts: 6 Location: India
Pandora-Box,
I am sorry. Both the steps use SYNCSORT only.
Here are more details :
Main Input file is FB with LRECL of 817. It has key field of 15 Charactor at column 744.
STEP 1 ) Dedupe on Key field to split main input file in Unique file and Duplicate file.
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=RACF.INPUT.FILE,DISP=SHR
//SORTOUT DD DSN=RACF.UNIQUE.FILE,DISP=(NEW,CATLG,DELETE)
//SORTXSUM DD DSN=RACF.DUPLIC.FILE,DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=(744,15,CH,A),EQUALS
SUM FIELDS=NONE,XSUM
//*
STEP 2 ) Match main input file and Duplicate file on key field using JOINKEYS. For matched record, 'L' is written in output at column 759. For unmatched record, 'S' is written in output at column 759.
//STEP2 EXEC PGM=SORT
//SORTJNF1 DD DSN=RACF.DUPLIC.FILE,DISP=SHR
//SORTJNF2 DD DSN=RACF.INPUT.FILE,DISP=SHR
//SRTFIL1 DD DSN=RACF.OUTPUT.FILE,DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(744,15,A)
JOINKEYS FILES=F2,FIELDS=(744,15,A)
JOIN UNPAIRED,F2
REFORMAT FIELDS=(F2:1,817,F1:744,15)
SORT FIELDS=(2,30,BI,A,32,786,BI,A)
SUM FIELDS=NONE
OUTREC IFTHEN=(WHEN=(744,15,CH,NE,818,15,CH),
OVERLAY=(759:C'S')),
IFTHEN=(WHEN=(744,15,CH,EQ,818,15,CH),
OVERLAY=(759:C'L'))
OUTFIL FNAMES=SRTFIL1,
OUTREC=(1:1,817)
//*
Is it a way I can get whole operation done using single sort step ?
Thanks,
Megha
Back to top
Pandora-Box Global Moderator Joined: 07 Sep 2006Posts: 1592 Location: Andromeda Galaxy
Hi Megha,
Please be aware SYNCSORT questions need to be posted in JCL forum
Also You are yet to explain the purpose of eliminating duplicates and joining with the duplicates again??
Can you please show us some sample data of step one and step 2?
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
You are doing four sorts. Two are unnecessary (you should specify SORTED on the JOINKEYS).
Does your Syncsort version support JNFnCNTL files? Talk to Syncsort support.
Without that, definitely, since you are doing it that way, with two sorts, you'll need two steps.
Back to top
Megha Saravagi New User Joined: 28 Dec 2011Posts: 6 Location: India
Pandora Box,
Objective here is to identify unique/duplicate record in the input file on a certain key field. I need to mark unique record as 'S' and duplicate record as 'L'.
Could you suggest something different from the above mentioned method, which would be more cost effective in terms of CPU Time?
Thanks,
Megha
Back to top
Megha Saravagi New User Joined: 28 Dec 2011Posts: 6 Location: India
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
To use the JNFnCNTL you'll have to check your version of Syncsort, and talk to Syncsort support if you don't currently have access.
If you can fully describe your processing, including the original order and the new order of the file, there may be something but hard to tell without information.
Back to top
Please enable JavaScript!