Points to be noted:Case 3
: In this case first integer gets truncated while moving fromS9 (09) COMP to X (10). Binary format (COMP) numbersoccupy 2, 4 or 8 bytes of storage and the leftmost bit isused as the operational sign. In this case ‘Sign’ isassociated with the first integer value i.e. ‘1’.There are 2 ways to get the correct value in the target field:
Use one intermediate variable of 9(10).S9 (09) COMP
9(10) and then9(10)
Change the Picture clause of the source variable to S9(10) COMP. In this way ‘Sign’ gets freed up with the firstinteger value i.e.S9 (10) COMP
X (10)(=1234567891) (=1234567891)
Case 4 & 6
: In case 4, it is the display which is not showing thecorrect value but actually the correct value is storedinternally. In the decimal numeric type ‘Sign’ is alwaysassociated with the last byte.In case 6, first integer gets truncated because the target pictureclause is not big enough to accommodate the incomingdata.
Binary items with nine or more digits require more handlingby the compiler.
Input Variable has data stored with the usage asCOMP-3.
Points to be noted: