I am running NX51 and have code that has issues while compressing data. Essentially the program is compressing previously expanded data that was brought down from the Mainframe in ASCII. This code has been in Production for some years but it appears it has a problem handling data that meets a certain criteria: The below code is to compress data that has a single decimal in the definition of the compressed output. The input expanded data has 3 decimals so before this line is executed for example WS-PACKED-DATA-W-DECIMAL has +0000000000030.000. 01 WS-PACKED-DATA-W-DECIMAL PIC S9(13)V9(3) COMP-3. IF WS-DECIMAL-PLACES = 1 COMPUTE WS-PACKED-DATA-W-DECIMAL = WS-PACKED-DATA-W-DECIMAL / 100.000 After this code is executed I see "Illegal data in numeric field" in WS-PACKED-DATA-W-DECIMAL I am not sure what i am missing here. This code works fine for decimals greater than 1 with the below code: IF WS-DECIMAL-PLACES = 2 COMPUTE WS-PACKED-DATA-W-DEC-UNSIGN = WS-PACKED-DATA-W-DEC-UNSIGN / 10 IF WS-DECIMAL-PLACES = 3 COMPUTE WS-PACKED-DATA-W-DEC-UNSIGN = WS-PACKED-DATA-W-DEC-UNSIGN / 1
↧