Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Specify OMIT for the value(s) you do not want in the output file.
If you want more help, you need to provide more info.
Post some sample input data and the output you want from that sample input (use the Code tag for alignment/readability). Post the dsorg and lrecl of the files. Post any rules for getting from the input to the output.
The input file contains 1784989 records
The field 1-10 (Item number) is what I have with me. I have around 4000 Item numbers for which its entire record has to be removed now.
I wanted to know if OMIT - SORT can do this, if so how do i give so many Inputs.
I came to know that DFSORT is present in our installation.
But the PTF UK51707 is still not applied (I got the ICE005A 0 BLANK NEEDED IN COLUMN 1 error)
I have asked system programmer for upgrade too.
In the meantime, What other options can I do this on SORT (DFSORT now)
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Your topic has been relocated to the DFSORT part of the forum and Syncsort has been removed form the Subject/Title. Also, some replies that no longer relate were deleted. . .
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
If you don't have the DFSORT PTF with JOINKEYS, two other options would be:
1) SPLICE
2) Multiple IFTHEN clauses (to overcome the limit for the number of conditions in one logical expression which is about 1600 for the type of constant you're talking about).
For examples of SPLICE, see the "Create files with matching and non-matching records" Smart DFSORT Trick at:
But seems, I'm missing something - can you help with this?
My JCL:
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=PUBLIC.STAR.EARL.EXTR120.G4828,DISP=SHR
//IN2 DD DSN=PUBLIC.STAR.SPAM.ISSUES1,DISP=SHR
//*USE MOD FOR T1
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),
// DISP=(MOD,PASS)
//OUT12 DD SYSOUT=* NAMES IN FILE1 AND FILE2
//OUT1 DD DSN=PUBLIC.STAR.EARL.EXTR120.G4828Z,
// UNIT=(SYSDA,4),SPACE=(CYL,(2369,500),RLSE),
// DCB=*.IN1,
// DISP=(NEW,CATLG,DELETE)
//OUT2 DD DUMMY NAMES IN FILE2 ONLY
//* ADD '11' IDENTIFIER FOR FILE1 RECORDS.
//* ADD '22' IDENTIFIER FOR FILE2 RECORDS.
//* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
//* TO THEIR APPROPRIATE OUTPUT FILES.
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(1,10,CH) WITH(814,1) -
KEEPNODUPS USING(CTL3)
/*
//* MARK FILE1 RECORDS WITH '11'
//CTL1CNTL DD *
INREC OVERLAY=(813:C'11')
/*
//* MARK FILE1 RECORDS WITH '22'
//CTL2CNTL DD *
INREC OVERLAY=(81:C'22')
/*
//* WRITE MATCHING RECORDS TO OUT12 FILE. REMOVE ID.
//* WRITE FILE1 ONLY RECORDS TO OUT1 FILE. REMOVE ID.
//* WRITE FILE2 ONLY RECORDS TO OUT2 FILE. REMOVE ID.
//CTL3CNTL DD *
OUTFIL FNAMES=OUT12,INCLUDE=(814,2,CH,EQ,C'12'),BUILD=(1,813)
OUTFIL FNAMES=OUT1,INCLUDE=(814,2,CH,EQ,C'11'),BUILD=(1,813)
OUTFIL FNAMES=OUT2,INCLUDE=(81,2,CH,EQ,C'22'),BUILD=(1,80)
/*
As told earlier in teh post - I need to remove records from IN1 based on the 10 digit key from IN2.
The IN1 file is FB with LRECL 813
The IN2 file is FB with LRECL 80.
The error i got is:
Code:
ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED
ICE650I 0 VISIT http://www.ibm.com/storage/dfsort FOR ICETOOL PAPERS, EXAMPLES AND MORE
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS: TOOLIN
ICE630I 0 MODE IN EFFECT: STOP
COPY FROM(IN1) TO(T1) USING(CTL1)
ICE606I 0 DFSORT CALL 0001 FOR COPY FROM IN1 TO T1 USING CTL1CNTL TERMINATED
ICE602I 0 OPERATION RETURN CODE: 16
ICE630I 2 MODE IN EFFECT: SCAN
COPY FROM(IN2) TO(T1) USING(CTL2)
ICE612I 0 NO ERRORS FOUND IN STATEMENT
SPLICE FROM(T1) TO(OUT1) ON(1,10,CH) WITH(814,1) -
KEEPNODUPS USING(CTL3)
ICE612I 0 NO ERRORS FOUND IN STATEMENT
Thanks for pointing the overlay in CTL1CNTL - even after i corrected it to 814 I get the same error.
The FILE2 will always have known records count of 4000 odd records.
Let me know the easier way or the error in the SORT above.
(We don't use COBOL here, else I would have picked the sticky program for file-matching from the forum)
alan_blore,
Regarding your splice job, you have logical errors in your control card. Please try to refer to the link for Smart DFSort Trick which Frank provided earlier and code your job accordingly.