klophockey
Programmer
I am not sure of what the bottom line issue is with respect to my using COMP-1 in a program.
I have a field defined as XYZ-FLD PIC 9(8) COMP-1.
I want to store the number 20110531 in the field. However, when I go to retrieve the value of the field I stored it says that it has a value of 9021. I have no idea what the 9021 even means.
The way I get the 9021 value is to read the record from the file and for that field bring it back into a S9(8) COMP-1 field, and then move it to a plain 9(8) field, and then display the 9(8) field so I can verify the data value.
The maximum number I can move into the field and be valid *same number in as it is out) is 32767.
Is there a Cobol compiler option that needs to be changed in order to store the larger number? If there is a compiler option that should be turned on, please let me know your specifics on that as well.
Thank you
I have a field defined as XYZ-FLD PIC 9(8) COMP-1.
I want to store the number 20110531 in the field. However, when I go to retrieve the value of the field I stored it says that it has a value of 9021. I have no idea what the 9021 even means.
The way I get the 9021 value is to read the record from the file and for that field bring it back into a S9(8) COMP-1 field, and then move it to a plain 9(8) field, and then display the 9(8) field so I can verify the data value.
The maximum number I can move into the field and be valid *same number in as it is out) is 32767.
Is there a Cobol compiler option that needs to be changed in order to store the larger number? If there is a compiler option that should be turned on, please let me know your specifics on that as well.
Thank you