I have following doubt regarding COMP items.
In a famous COBOL book which is reffered by many programmers I found below description about COMP items.
Book name is: COBOL PROGRAMMING (2nd Edition)
Author Name: M K ROY, D GHOSH DASTIDAR
COMP item is described there on page no. 127 as follows:
"When usage is specified as COMP, the numeric data item is represented in pure binary. The item must be in integer (no assumed decimal point is allowed). Such data items are often used as subscripts. Depending on the size of the data item, it can be stored either in half-word or in full-word (32 bits). Only integral numbers in the range -32768 to +32767 can be accomodated in half word. A full word can store any integral number in the range -2147483648 to 2147483647. The picture of a COMP item should not contain any character other than 9,S."
I have coded a test program wherein I have defined a variable as PIC S9(2)V99 COMP. I moved non-integer value to this variable e.g. 30.56. The job completed successfully and I am able to view this value 30.56 populated correctly in this variable.
So my Question is can COMP items contain decimal part?