Strange behavior with edit fields.

Strange behavior with edit fields.

Found this strange outcome in the following scenario.

After many years of program exporting the "30000" result (many different version of the runtime) , suddenly at one site, it started exporting the correct "3000" result.

I know how to fix it but why the inconsistent behavior?

       01  PD-RECORD.

              05 PD-DOSAGEX.

                 07 PD-DOSAGE           PIC S9(5)V99 COMP-3 VALUE 30.00.

 

       01  XTRACT-DETAILS.

           03 XD-SOURCE                 PIC X(8).

           03                                            PIC X.

           03 XD-DAYSSUP                PIC Z(4)9.99.

           03 XD-DAYSSUPV REDEFINES XD-DAYSSUP PIC Z(5)VZZ.

           03                                            PIC X.

 

           MOVE LOW-VALUES TO XTRACT-DETAILS.

           INITIALIZE XTRACT-DETAILS.

 

           IF PD-DOSAGEX NOT = SPACES

              MOVE PD-DOSAGE      TO XD-DAYSSUPV

           END-IF

?????? XD-DAYSSUPV = “3000”

?????? XD-DAYSSUP = “30000”

compiler switches  "CCBLFLAGS=-C40re -Dcisiz1 -Z50zlga -Vcxq"

Labels (1)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Comments

Based on you compile switches, especially -C40 and -Z50 the behavior should not change. There was a change that could have affected this: 

SUBJECT: Compile flag -Zz fails to convert low-values & spaces in numeric fields
Change Number:  ECN-3962  - that change was made around version 8.1.2
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2019-12-20 10:46
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.