Strange thing here. During my test of an ADS dialog, numeric value 120 was moved to an index field which was defined as a PIC 9(2) COMP field.
A bit further a field with that index was referenced like this:
Move Field(index) to FIELD2.
‘Index’ was defined as PIC 9(2) COMP and before value 120 was moved to index. The dialog didn’t abended. How come? Do i have to worry about this? Whats the value of ‘index’ after the move of 120???
Thanks
I am presuming PIC 9(2) COMP is the same in CA ADS as in Cobol !!!
The answer lies in
A PIC 9(2) COMP will typically be allocated as either a 1 byte of 2 byte binary integer. A
So a PIC 9(2) COMP can store 120.
Most (if not all) Cobol compilers have the option to check/correct Comp overflows but these options are often switched off to improve performance. I presume it is the same for CA ADS.