klophockey
Programmer
Could you point to or provide documentation that would show the appropriate way to code for COMP-1 and COMP-2 fields in Working Storage.
I read some documentation that the Picture clause is not allowed and that USAGE IS must be used. However, that does not compile cleanly in the ISCobol environment.
What I would hope to see is a list of data types and the definition for them. One would be non signed and the other would be signed.
Example of what I am looking to code correctly is shown below as the starter so you can see what I am trying to code.
For example, I would like to insert the value of 12.89 into C1-2 and 23.45 in C1-2S.
Of course, they do not have the decimal shown but if I code such as 99v999999999 it says out of range and the USAGE clause does not work
03 C1-1 PIC 9 COMP-1.
03 C1-1S PIC S9 COMP-1.
03 C1-2 PIC 9(18) COMP-1.
03 C1-2S PIC S9(18) COMP-1.
03 C2-1 PIC 99v99 COMP-2.
03 C2-1S PIC S99v99 COMP-2.
I read some documentation that the Picture clause is not allowed and that USAGE IS must be used. However, that does not compile cleanly in the ISCobol environment.
What I would hope to see is a list of data types and the definition for them. One would be non signed and the other would be signed.
Example of what I am looking to code correctly is shown below as the starter so you can see what I am trying to code.
For example, I would like to insert the value of 12.89 into C1-2 and 23.45 in C1-2S.
Of course, they do not have the decimal shown but if I code such as 99v999999999 it says out of range and the USAGE clause does not work
03 C1-1 PIC 9 COMP-1.
03 C1-1S PIC S9 COMP-1.
03 C1-2 PIC 9(18) COMP-1.
03 C1-2S PIC S9(18) COMP-1.
03 C2-1 PIC 99v99 COMP-2.
03 C2-1S PIC S99v99 COMP-2.