Hi all,
I should probably say "my problem with SORT SUM", as the real problem is
not with SORT.

So, I have an input file with a 100 byte record that has a dataset name on
the first 44 bytes and a numeric value (UFF) on the last ten.
I need to sum up those 10 last bytes by High Level Qualifier.
My problem, after a few variations, is that I cannot get rid of the

ICE152I 0 OVERFLOW DURING SUMMATION - RC=0

message.

This is my latest try:

 //SYMNAMES DD *
 INP-DSN,01,44,CH
 INP-BYTE,91,10,UFF
 SKIP,1
 FMT-HLQ,1,08,CH
 FMT-BYTE,*,08,BI
 TMP-BYT1,=,04,BI
 TMP-BYT2,*,04,BI

//SYSIN    DD *
  INREC PARSE=(%01=(ABSPOS=1,ENDBEFR=C'.',FIXLEN=8)),
        OVERLAY=(FMT-HLQ:%01,
                 TMP-BYT2:INP-BYTE)     * SUM HLQ ALLOC SPACE
  SORT FIELDS=(FMT-HLQ,A)
   SUM FIELDS=(FMT-BYTE)
  OUTREC BUILD=(X,
                FMT-HLQ,
                X,
                FMT-BYTE,TO=ZD,LENGTH=16)
/*

The SORTOUT is deirected to SYSOUT and it looks something like this:

COMUM    9242510529872113
COMUM    9242510529872114
COMUM    9242510529872114
COMUM    9242510529872114
COMUM    9242510529871936
COMUM    9242510529871936
COMUM    9242510529872113
COMUM    9242510529872113
COMUM    9242510529872113

There are 26 of those when there should be only one (not counting the few
hundreds more repetitions of several HLQs)
So, what am I doing wrong?

Your help will be, as usual, greatly appreciated,
Jack

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to