Quantcast
Channel:
Viewing all articles
Browse latest Browse all 43829

Forum Post: Illegal Data in Numeric Field

$
0
0
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  

Viewing all articles
Browse latest Browse all 43829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>