IBM Support

PI98480: NEW FUNCTION: ADD TWO NEW SUBOPTIONS TO THE NUMCHECK SUBOPTION ZON - ZON(ALPHNUM) & ZON(NOALPHNUM)

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • Add two new suboptions to the NUMCHECK suboption ZON -
    ZON(ALPHNUM) & ZON(NOALPHNUM).
    If NUMCHECK(ZON) is specified, this defaults to
    NUMCHECK(ZON(ALPHNUM)).  NUMCHECK(ZON(NOALPHNUM)) will cause
    the compiler not to generate numeric checks when comparing zone
    decimal data items to an alphanumeric literal.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of IBM Enterprise COBOL V6.2       *
    *                 compiling and running programs that specify  *
    *                 the NUMCHECK(ZON) compiler option and who    *
    *                 would like to suppress the generation of     *
    *                 numeric checks when comparing zone decimal   *
    *                 data items to alphanumeric items.            *
    ****************************************************************
    * PROBLEM DESCRIPTION: New function: New suboptions have been  *
    *                      added to the existng ZON suboption of   *
    *                      the NUMCHECK compiler option.  The      *
    *                      suboptions are ZON(ALPHNUM), which      *
    *                      supports the current behavior, and      *
    *                      ZON(NOALPHNUM).  If the user specifies  *
    *                      NUMCHECK(ZON(NOALPHNUM)), then the      *
    *                      compiler will not generate numeric      *
    *                      checks for comparisons between zone     *
    *                      decimal data items and alphanumeric     *
    *                      items.                                  *
    ****************************************************************
    * RECOMMENDATION: Apply the IBM provided PTF                   *
    ****************************************************************
    Prior to this new function, it was not possible to
    limit the scope of the numeric checks generated by
    the compiler when NUMCHECK(ZON) was in effect.
    Numeric checks would always be generated for any
    comparison between zone decimal data items and
    alphanumeric items, which were not wanted by
    all users.
    

Problem conclusion

Temporary fix

Comments

  • The compiler has been updated to support the new ALPHNUM
    suboption of the ZON suboption.  When NUMCHECK(ZON(NOALPHNUM))
    is specified for a compile, then no numeric checks will be
    generated for comparisons between zone decimal data items and
    alphanumeric items.
    
    The Programming Guide will be changed as follows to describe the
    new compiler suboption NUMCHECK(ZON(ALPHNUM|NOALPHNUM)):
    
    +--------------------------------------------------------------+
    | Start of changes for:                                        |
    | Enterprise COBOL for z/OS Programming Guide, SC14-7382-01    |
    
      Chapter 17. Compiler options
    
      NUMCHECK
    
      The NUMCHECK compiler option tells the compiler whether
      to generate extra code to validate data items when they
      are used as sending data items. For zoned decimal (numeric
      USAGE DISPLAY) and packed decimal (COMP-3) data items,
      the compiler generates implicit numeric class tests for
      each sending field. For binary data items, the compiler
      generates SIZE ERROR checking to see whether the data
      item has more digits than its PICTURE clause allows.
    
    
      NUMCHECK option syntax
    
    |    .-NONUMCHECK-------------------------------------------.
    | >>-+------------------------------------------------------+->
    |    '-NUMCHECK-+-----------------------------------------+-'
    |               |  .-,--------------------------------.   |
    |               |  V                                  |   |
    |               '-(-+-+-ZON-+-------------------+-+-+-+-)-'
    |                   | |     +-(-+--ALPHNUM--+-)-+ | |
    |                   | |         '-NOALPHNUM-'     | |
    |                   | '-NOZON---------------------' |
    |                   +-+-PAC---+---------------------+
    |                   | '-NOPAC-'                     |
    |                   +-+-BIN---+---------------------+
    |                   | '-NOBIN-'                     |
    |                   '-+-MSG-+-----------------------+
    |                     '-ABD-'
    
    
      Option default is: NONUMCHECK
    
    
      Suboption defaults are:
    
    |     If no datatype suboption is specified, default datatype
    |     suboptions are ZON(ALPHNUM), PAC, and BIN.  For example,
    |     NUMCHECK=(ABD) has the same effect as
    |     NUMCHECK=(ZON(ALPHNUM),PAC,BIN,ABD).
    
    |     If only one datatype suboption is specified, defaults
    |     are NOZON, NOPAC, NOBIN, and MSG. For example,
    |     NUMCHECK=(BIN) has the same effect as
    |     NUMCHECK=(NOZON,NOPAC,BIN,MSG).
    
    |     If all datatype suboptions are specified with NO, then
    |     the listing will show NONUMCHECK.  For example,
    |     NUMCHECK=(NOZON,NOPAC,NOBIN) has the same effect as
    |     NUMCHECK=NO.
    
      Abbreviations are: NONC | NC
    
    
    | ZON [(ALPHNUM | NOALPHNUM)] | NOZON
    |
    |    Specifying ZON or ZON(ALPHNUM) causes the compiler to
    |    generate code for an implicit numeric class test for zoned
    |    decimal (numeric USAGE DISPLAY) data items that are used as
    |    sending data items in COBOL statements.
    |
    |    Specifying ZON(NOALPHNUM) causes the compiler to avoid
    |    generating code for an implicit numeric class test for
    |    zoned decimal (numeric USAGE DISPLAY) data items when they
    |    are used in a comparison with an alphanumeric data item,
    |    alphanumeric literal or alphanumeric figurative constant.
    
      PAC | NOPAC
    
          Specifying PAC causes the compiler to generate code
          for an implicit numeric class test for packed decimal
          (COMP-3) data items that are used as sending data
          items in COBOL statements.
    
      BIN | NOBIN
    
          Specifying BIN causes the compiler to generate code
          similar to ON SIZE ERROR to test if binary data items
          contents are bigger than the PICTURE clause when
          TRUNC(BIN) is not in effect. This extra code will be
          generated only for binary data items that are used
          as sending data items, and COMP-5 data items will
          not get this ON SIZE ERROR code generated.
    
      MSG | ABD
    
          Determines whether the message issued for invalid
          data is a warning level message to continue processing
          or a terminating level message to cause an abend:
    
            If MSG is in effect, a runtime warning message with
                the line number, data item name, data item content,
                and program name is issued.
            If ABD is in effect, a terminating message is issued
                that causes an abend.
    
         NUMCHECK(ZON,MSG) is treated as if NUMCHECK(MSG) were in
         effect.  NUMCHECK(ZON,ABD) is treated as if NUMCHECK(ABD)
         were in effect.
    
    | End of changes for:                                          |
    | Enterprise COBOL for z/OS Programming Guide, SC14-7382-01    |
    +--------------------------------------------------------------+
    
    The Customization Guide will be changed as follows to describe
    the syntax of the new compiler suboption,
    NUMCHECK(ZON(ALPHNUM|NOALPHNUM)):
    
    +--------------------------------------------------------------+
    | Start of changes for:                                        |
    | Enterprise COBOL for z/OS Customization Guide, SC14-7380-01  |
    
      Chapter 2:  Enterprise COBOL compiler options
    
      The NUMCHECK compiler option tells the compiler whether to
      generate extra code to validate data items when they are used
      as sending data items.  For zoned decimal (numeric USAGE
      DISPLAY) and packed decimal (COMP-3) data items, the compiler
      generates implicit numeric class tests for each sending field.
      For binary data items, the compiler generates SIZE ERROR
      checking to see whether the data item has more digits than
      its PICTURE clause allows.
    
        Syntax
    
    |                     .--NO---------------------------------.
    |                     |.-,--------------------------------. |
    |                     |V                                  | |
    |>>-NUMCHECK=-+---+-(-+-+-+-ZON-+-------------------+-+-+-+-+)->
    |             +-*-+     | |     '-(-+--ALPHNUM--+-)-' | |
    |                       | |         '-NOALPHNUM-'     | |
    |                       | '-NOZON---------------------' |
    |                       +-+-PAC---+---------------------+
    |                       | '-NOPAC-'                     |
    |                       +-+-BIN---+---------------------+
    |                       | '-NOBIN-'                     |
    |                       '-+-MSG-+-----------------------'
    |                         '-ABD-'
    
      Default
    
        NUMCHECK=(NO)
    
        Suboption defaults are:
    
    |     If no datatype suboption is specified, default datatype
    |     suboptions are ZON, PAC, and BIN.  For example,
    |     NUMCHECK=(ABD) has the same effect as
    |     NUMCHECK=(ZON(ALPHNUM),PAC,BIN,ABD).
    
    |     If only one datatype suboption is specified, defaults
    |     are NOZON, NOPAC, NOBIN, and MSG. For example,
    |     NUMCHECK=(BIN) has the same effect as
    |     NUMCHECK=(NOZON,NOPAC,BIN,MSG).
    
    |     If all datatype suboptions are specified with NO, then
    |     the listing will show NONUMCHECK.  For example,
    |     NUMCHECK=(NOZON,NOPAC,NOBIN) has the same effect as
    |     NUMCHECK=NO.
    
    | ZON [(ALPHNUM | NOALPHNUM)] | NOZON
    
    |     Specifying ZON or ZON(ALPHNUM) causes the compiler to
    |     generate code for an implicit numeric class test for zoned
    |     decimal (numeric USAGE DISPLAY) data items that are used
    |     as sending data items in COBOL statements.
    
    |     Specifying ZON(NOALPHNUM) causes the compiler to avoid
    |     generating code for an implicit numeric class test for
    |     zoned decimal (numeric USAGE DISPLAY) data items when they
    |     are used in a comparison with an alphanumeric data item,
    |     alphanumeric literal or alphanumeric figurative constant.
    
    |     Receivers are not checked, unless they are both a sender
    |     and a receiver, such as data item B in the following
    |     sample statements:
    
          ADD A TO B
    
          DIVIDE A INTO B
    
          COMPUTE B = A + B
    
          INITIALIZE B REPLACING ALPHANUMERIC BY B
    
        This checking is done before the data is used in each
        statement:
    
    |       If the data is NOT NUMERIC, either a warning message
    |       for NUMCHECK=(ZON(ALPHNUM),MSG) or a terminating
    |       message for NUMCHECK=(ZON(ALPHNUM),ABD) is issued.
    
      If the data is NUMERIC, the external behavior of the statement
      is the same as NUMCHECK=(NOZON), other than being slower.
    
     Chapter 19: Debugging, section Getting Listings,
       Reading LIST output, Signature information bytes
    
     In signature byte 31, modify description of bit 0 as follows:
    
     |31|0| NUMCHECK(ZON[(ALPHNUM)]) | Not NUMCHECK(ZON[(ALPHNUM)])
    
     In signature byte 31, add a new bit 6 as follows:
    
     |31|6| NUMCHECK(ZON(NOALPHNUM)) | Not NUMCHECK(ZON(NOALPHNUM))
    
    | End of changes for:                                          |
    | Enterprise COBOL for z/OS Programming Guide, SC14-7382-01    |
    +--------------------------------------------------------------+
    

APAR Information

  • APAR number

    PI98480

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655EC600

  • Reported release

    620

  • Status

    CLOSED UR1

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-05-28

  • Closed date

    2018-07-18

  • Last modified date

    2018-10-02

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

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

    PH01241 PH01251

Modules/Macros

  • IGY8RWTU IGYCASMB IGYCCBE  IGYCCCRT IGYCCICS IGYCCSRV IGYCDGEN
    IGYCDIAG IGYCDMAP IGYCEN$0 IGYCEN$1 IGYCEN$2 IGYCEN$3 IGYCEN$4
    IGYCEN$5 IGYCEN$8 IGYCEN$D IGYCEN$R IGYCFGEN IGYCFREE IGYCINIT
    IGYCJA$0 IGYCJA$1 IGYCJA$2 IGYCJA$3 IGYCJA$4 IGYCJA$5 IGYCJA$8
    IGYCJA$D IGYCJA$R IGYCLIBH IGYCLIBO IGYCLIBR IGYCLSTR IGYCLVL0
    IGYCLVL1 IGYCLVL2 IGYCLVL3 IGYCLVL8 IGYCMALL IGYCOB2E IGYCOPI
    IGYCOSCN IGYCPGEN IGYCRCTL IGYCRDPR IGYCRDSC IGYCREAL IGYCRWT
    IGYCSCAN IGYCSIMD IGYCUE$0 IGYCUE$1 IGYCUE$2 IGYCUE$3 IGYCUE$4
    IGYCUE$5 IGYCUE$8 IGYCUE$D IGYCUE$R IGYCXREF IGYDRV   IGYEQCWI
    IGYMSGE  IGYMSGK  IGYMSGT  IGYQCBE  IGYWIVP1 IGYWIVP2 IGYZQDRV
    IGYZQENU IGYZQJPN
    

Publications Referenced
SC14738201SC14738001   

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655EC600

Applicable component levels

  • R620 PSY UI57342

       UP18/08/02 P F807

  • R621 PSY UI58271

       UP18/10/02 P F809

  • R622 PSY UI57344

       UP18/07/31 P F807

  • R62H PSY UI58273

       UP18/09/06 P F809

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.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"620","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
12 December 2023