IBM Support

PH12484: NUMVAL AND TEST-NUMVAL DO NOT DIAGNOSE INPUT WITH BAD FORMAT AS INCORRECT INPUT AND PRODUCE FAULTY RESULTS

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • NUMVAL and TEST-NUMVAL do not diagnose input with bad format as
    incorrect input and produce faulty results
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL V5 and later       *
    *                 releases compiling and running programs      *
    *                 that use NUMVAL and TEST-NUMVAL intrinsic    *
    *                 functions.                                   *
    *                                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: NUMVAL and TEST-NUMVAL intrinsic        *
    *                      functions produce faulty results when   *
    *                      inputs are incorrect. NUMVAL also       *
    *                      misses a diagnostic message.            *
    *                                                              *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    *                                                              *
    ****************************************************************
    During NUMVAL and TEST-NUMVAL intrinsic function processing, the
    COBOL runtime fails to validate and diagnose invalid input
    styles as incorrect, and returns faulty values without
    indicating about the error.
    
     FIXCAT keyword: COB0501T/K  COB0502T/K  COB0601T/K  COB0602T/K
    

Problem conclusion

  • The COBOL Runtime is corrected to detect invalid input to NUMVAL
    and TEST-NUMVAL intrinsic functions. Diagnostic message is
    issued by NUMVAL, and the appropriate non-zero return value is
    returned by TEST-NUMVAL.
    
    +--------------------------------------------------------------
    +
    | Start of changes for:
    |
    | Enterprise COBOL for z/OS Language Reference, SC27-8713-01
    |
    +--------------------------------------------------------------
    Chapter 21. Intrinsic functions
    The following additions will be added to the end of NUMVAL,
    NUMVAL-C, NUMVAL-F, TEST-NUMVAL, TEST-NUMVAL-C and
    TEST-NUMVAL-F function descriptions:
    
    NUMVAL
    Usage note: Due to the different input string syntax of NUMVAL,
    NUMVAL-F, and NUMVAL-C, their diagnostic messages may vary
    slightly when diagnosing incorrect input formats. For example,
    NUMVAL('ABC       ') and NUMVAL-F('ABC       ')  would result
    in diagnostic message indicating there is no digit found, while
    NUMVAL-C('ABC       ') would result with a message indicating
    character 'A' is found to be an invalid character. In any case
    the meaning of the messages should be obvious.
    
    NUMVAL-C
    Usage note: see the usage note in the NUMVAL function
    
    NUMVAL-F
    Usage note: see the usage note in the NUMVAL function
    
    TEST-NUMVAL
    Usage note: Due to the slightly different input string syntax
    of TEST-NUMVAL, TEST-NUMVAL-F, and TEST-NUMVAL-C, their
    non-zero return values may vary when the content of argument-1
    is not conforming to the specification of their associating
    NUMVAL, NUMVAL-F and NUMVAL-C input formats. These differences
    reflect the diagnostic behaviour of NUMVAL, NUMVAL-F and
    NUMVAL-C. For example, TEST-NUMVAL-C('ABC       ') would return
    1 because the character 'A' is found to be an invalid character
    by NUMVAL-C,  while TEST-NUMVAL ('ABC       ') and
    TEST-NUMVAL-F ('ABC       ') would return 11 because no input
    digits is found by NUMVAL (and TEST-NUMVAL-F). The later
    condition falls under the (FUNCTION LENGTH (argument-1) + 1)
    rule of TEST-NUMVAL and TEST-NUMVAL-F.
    
    TEST-NUMVAL-C
    Usage note: see the usage note in the TEST-NUMVAL function
    
    TEST-NUMVAL-F
    Usage note: see the usage note in the TEST-NUMVAL function
    
    +--------------------------------------------------------------
    | End of changes for:
    |
    | Enterprise COBOL for z/OS Language Reference, SC27-8713-01
    |
    +--------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH12484

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655EC600

  • Reported release

    7A0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-05-24

  • Closed date

    2019-06-12

  • Last modified date

    2019-07-01

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

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

    PH13070 UI63601

Modules/Macros

  •    IGZCEV4  IGZLLIBV IGZXAPI  IGZXCDA  IGZXDMR
    IGZXD24  IGZXLPIO IGZXLPKA IGZXLPKB IGZXLPKC IGZXLPKD IGZXLPKE
    IGZXLPKF IGZXLPKG IGZXPK2
    

Publications Referenced
SC27871301    

Fix information

  • Fixed component name

    LE ENT COBOL LI

  • Fixed component ID

    568819812

Applicable component levels

  • R7A0 PSY UI63601

       UP19/06/18 P F906

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"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7A0","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
12 December 2023