The SUM command tells the sort to remove duplicates and to summarize the field(s) specified in the FIELDS parameter. With FIELDS=NONE, the summarize function is omitted, leaving the remove duplicates function.
I don't really mean to use this forum as a "debugging forum", but when I use your suggestion "SUM FIELDS=(NONE), my job abends with a "CONTROL STATEMENT ERROR". That's why I asked the above.
Here is my SORT Parm....
----+----1----+----2----+----3----+----4----+----5
/ SORT KEYS=(4,16,CH,A,)
/ SUM FIELDS=NONE
/ OMIT COND=(1,1,CH,EQ,C'*')
/ INPUT IN
/ OUTPUT OUT
/ FIN
My reasponse was based on the proper parameters for use with the DFSORT product. What SORT product are you using? I've never heard of some of those parameters (SORT KEYS? INPUT IN? OUTPUT OUT? FIN?)
SORT/MERGE V12L10 <<<MPCJ63 .STEP0030>>>
/ SORT KEYS=(4,16,CH,A)
/ SUM FIELDS=NONE
JSK037E SYNTAX ERROR - NONE
/ OMIT COND=(1,1,CH,EQ,C'*')
/ INPUT IN
/ OUTPUT OUT
/ FIN
JSK002A CONTROL STATEMENT ERROR
JSK350I SORT/MERGE ABEND <<MPCJ63 .STEP0030>>
Have tried it with Parentheses as below also....
SORT/MERGE V12L10 <<<DMCDBK01.STEP0030>>>
/ SORT KEYS=(4,16,CH,A)
/ SUM FIELDS=(NONE)
JSK010E INVALID VALUE OR FLD - NONE
/ OMIT COND=(1,1,CH,EQ,C'*')
/ INPUT IN
/ OUTPUT OUT
/ FIN
JSK012E FLD(1) TYPE INVALID ON SUM
JSK002A CONTROL STATEMENT ERROR
JSK350I SORT/MERGE ABEND <<DMCDBK01.STEP0030>>
Still fails ......
It's a Fujitsu mainframe - does that make any difference ??
It's not which mainframe that's important here, but which sort utility you are using. Clearly it's not DFSORT, as all DFSORT messages begin with 'ICE'.
Tried looking the message numbers up on Google without success.
Unless anyone else recognises it, you may have to RTFM...
OK - I posted in the 4th post of mine - "It's a Fujitsu mainframe - does that make any difference ??"
The reason for posting here is that there ISN'T a separate Mainframe Utils/JCL type forum. It comes into the COBOL forum because most of you COBOL programmers and IBM mainframers out there would have, undoubtedly coded a SORT step in a JCL proc in your careers.... I thought you'd be able to help......
As it turns out, none of the suggestions that have been proposed here work on a Fujitsu mainframe. Typical !!!! For whatever reason, Fujitsu "almost" copied IBM's utilites (IEBGENER = JSDGNER, IDCAMS = KQCAMS etc), but not the full functionlity.....
Any other suggestions as to how remove duplicate records from a file other that through a SORT. Obviously easy enough with another program, but I'm trying to fix the problem WITHOUT the need for another program.....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.