I need your assistance regarding COMP-3.
I need to move my computed date to an output file defined as PIC 9(08) comp-3. But for some reason it is converted to PIC X.
The program processing is as follows:
1. I will compute the date and move it in a format of PIC 9(08).
2. After a successful computation, I will move the computed date to a copybook with a format of PIC 9(08) comp-3.
3. After #2, I will move the whole copybook to the output file. I will move the 01level of the copybook to the 01 level of the output file.
The format of the output files is defined as
05 FILLER PIC X(24)
05 W-OUTPUT-FILE-DATE PIC 9(08) COMP-3
05 FILLER PIC X(105)
The problem I am having is that after step 3 the date is converted to PIC X. I don't know why the values are not in COMP-3. I checked the amounts and they are in comp-3 but for some reason the date is not.
I displayed all the variables from the computed date to the output file. They are all in comp-3 but if you view the file, they are converted to PIC X. Please help.