Skip to main content

PM81246: XML GENERATE IGNORES TRUNC(BIN) IN ENTERPRISE COBOL 4.2


A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • 5-digit Binary number PIC 9(04) with TRUNC(BIN) is missing
    a high order digit. Example- 32000 is wrongly cut to 2000.
    The XML GENERATE fails to honor the compiler option.
    02 data1  PICTURE 9(4) COMPUTATIONAL.
    MOVE 32000 TO data1.
    XML GENERATE output-string FROM data1.
    The result is <data1>2000</data1>.  That's wrong, it should be
    <data1>32000</data1>.
    

Local fix

  • Instead of USAGE IS COMPUTATIONAL, use COMPUTATIONAL-5.
    ***
    ADDITIONAL SEARCHWORDS:
    COMP  COMP-5
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL V4.2 who use the   *
    *                 verb XML GENERATE and the COMPILER option    *
    *                 TRUNC(BIN)                                   *
    *                                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: Truncated output of numeric variables.  *
    *                      For instance:                           *
    *                                                              *
    *                              CBL TRUNC(BIN)                  *
    *                              IDENTIFICATION DIVISION.        *
    *                              DATA DIVISION.                  *
    *                              WORKING-STORAGE SECTION.        *
    *                              01 g   PIC S9(04) BINARY.       *
    *                              01 doc PIC X(20).               *
    *                              PROCEDURE DIVISION.             *
    *                                    MOVE 32000 TO g           *
    *                                    XML GENERATE doc from g   *
    *                                    DISPLAY doc               *
    *                                    GOBACK.                   *
    *                              END PROGRAM.                    *
    *                                                              *
    *                      The output XML document is incorrect.   *
    *                      What is produced is:                    *
    *                       <g>2000</g>                            *
    *                                                              *
    *                      What should be produced is:             *
    *                       <g>32000</g>                           *
    *                                                              *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    *                                                              *
    ****************************************************************
    The COBOL compiler, when generating code for XML GENERATE, was
    not correctly changing the precision when TRUNC(BIN) was used.
    

Problem conclusion

  • The COBOL compiler is changed to increase the number of output
    digits consistent with BINARY values when TRUNC(BIN) is in
    effect.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM81246

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655S7100

  • Reported release

    420

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-01-23

  • Closed date

    2013-02-03

  • Last modified date

    2013-03-04

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UK91380

Modules/Macros

  •    IGYPXGF
    

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655S7100

Applicable component levels

  • R420 PSY UK91380

       UP13/02/09 P F302

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

Enterprise COBOL for z/OS


Software version:
4.2


Reference #:
PM81246


Modified date:
2013-03-04

Translate my page

Content navigation