I have a requirement where I would have to consolidate(add) a particular field(position 334,7) for every account number(position 16,9). The field to be summed up has the picture clause defined as PIC S9(11)V9(2) COMP-3. But after I sum it up I have to put the value into PIC S9(14)V9(4) COMP-3. The challenge I am facing is in the location of the decimal point when I use the sort card below. The value which has to be 495688.89 after summing appears as 4956.8889. The Input file has a LRECL=550, RECFM=FB.
Please help me resolve this issue.
//SYSIN DD *
I want the summed up value to be stored in S9(14)V9(4) COMP-3.
I will give you an example for a better understanding of what I am expecting. Here in the input file, the value that is seen is of PIC S9(11)V9(2) COMP-3. But when I write to the output file, I want the field to be in a S9(14)V9(4) COMP-3 which carries the total for each occurance of the 9 byte value.