IBM Support

PH36381: HOST CODE ANALYSIS INTERNAL DEFECTS AND ENHANCEMENTS

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Host Code Analysis internal defects and enhancements
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: 01.Customers with COBOL preprocessor expand  *
    *                    copy statements in SQL EXEC               *
    *                 02.Customers with COBOL preprocessor expand  *
    *                    copy statements in SQL EXEC               *
    *                 03.PL/I language customers using             *
    *                    preprocessing with Latin Sharp S (U+00DF) *
    *                    characters in the file                    *
    *                 04.COBOL 6 users with LEADING and TRAILING   *
    *                    options in their COPY statements          *
    *                 05.Customers with variable data named LOC in *
    *                    a COBOL program                           *
    *                 06.CICS COBOL users with with DFHVALUE       *
    *                 07.COBOL developers with code that has       *
    *                    EVALUATE WHEN () statements               *
    *                 08.All customers using PL/I 5.3 syntax       *
    *                 09.All customers using COBOL 6.3 syntax      *
    *                 10.Customers using COBOL 6.3 JSON PARSE and  *
    *                    GENERATE syntax                           *
    *                 11.Users who run PL/I code reviews with      *
    *                    missing END statements                    *
    *                 12.COBOL 6.3 syntax users who have multiple  *
    *                    JSON GENERATE or XML GENERATE conditional *
    *                    suppression                               *
    *                 13.users of COBOL 6.3 trying to determine    *
    *                    time from a formatted time using the new  *
    *                    COBOL 6.3 expression                      *
    *                 14.PL/I 5.3 syntax users with STRUCT         *
    *                 15.users of COBOL using Listagg function     *
    *                    within EXEC SQL statements                *
    *                 16.users of COBOL with sting literals        *
    *                    spanning multiple lines                   *
    *                 17.users of COBOL 6.3 using EXEC SQL INCLUDE *
    *                    statements with copybooks                 *
    *                 18.users of standard IBM copybooks           *
    ****************************************************************
    * PROBLEM DESCRIPTION: 01.Parsing problem when COBOL Tokens    *
    *                         such as @, :, $ etc. are inside the  *
    *                         EXEC SQL statement.                  *
    *                      02.Failure to resolve custom            *
    *                         preprocessor output inside of an     *
    *                         EXEC SQL statement.                  *
    *                      03.PL/I preprocessing Latin Sharp S     *
    *                         (U+00DF) changes it to SS.           *
    *                      04.COBOL parser throws a warning when   *
    *                         multiple substitutions are detected. *
    *                      05.Faulty warning on variable data      *
    *                         named "LOC" in a COBOL program.      *
    *                      06.Incorrect flagging of DFHVALUE       *
    *                         inside an EXEC CICS COMMAND as an    *
    *                         error.                               *
    *                      07.Faulty parsing for EVALUATE WHEN     *
    *                         (constant) in COBOL.                 *
    *                      08.PL/I language support updated to     *
    *                         PL/I 5.3.                            *
    *                      09.COBOL language support updated to    *
    *                         6.3, and added support additional    *
    *                         syntax of the July 2020 COBOL PTF.   *
    *                      10.Enhancement to support COBOL 6.3     *
    *                         APAR PH26780 JSON PARSE and GENERATE *
    *                         boolean name/value pairs with        *
    *                         CONVERTING option.                   *
    *                      11.NPE when missing END statements for  *
    *                         PL/I programs.                       *
    *                      12.Invalid syntax warnings for multiple *
    *                         generics in JSON GENERATE            *
    *                         suppression that the compiler        *
    *                         accepts.                             *
    *                      13.SECONDS-PAST-FORMATTED-TIME should   *
    *                         show a syntax warning in the file    *
    *                         while the correct function name      *
    *                         SECONDS-FROM-FORMATTED-TIME should   *
    *                         not.                                 *
    *                      14.Enhancement to support PL/I 5.3      *
    *                         NULLINIT attribute with STRUCT types *
    *                      15.Listagg function doesn't works with  *
    *                         realtime check.                      *
    *                      16.Incorrect syntax warning in IDz      *
    *                         COBOL parsing for a string literal   *
    *                         enclosed in single quotes spanning   *
    *                         multiple lines.                      *
    *                      17.EXEC SQL INCLUDE statement using a   *
    *                         copybook with the copybook name      *
    *                         containing #, $, or @ characters are *
    *                         not perceived correctly in COBOL     *
    *                         parsing.                             *
    *                      18.Software Analysis rules mark         *
    *                         standard IBM copybooks lines in      *
    *                         error.                               *
    ****************************************************************
    01.IDz parsing problem when COBOL Tokens such as @, :, $ etc.
       are inside the EXEC SQL statement.
    02.IDz Code Review fails to resolve custom preprocessor output
       inside of an EXEC SQL statement after preprocessing with a
       specific output file. The error says that the preprocessor
       statement resolution contains an error.
    03.After preprocessing a file with Latin Sharp S (U+00DF) the
       character is wrongly changed to SS in a PL/I program.
    04.COBOL has LEADING and TRAILING options on the COPY statement.
       COBOL parsing functions normally for statements with one
       substitution. However, the COBOL parser does not recognize
       code that includes multiple substitutions. It throws a
       warning when multiple substitutions are detected.
    05.There is a wrong warning on variable data named "LOC" in a
       COBOL program.
    06.Incorrect flagging of DFHVALUE inside an EXEC CICS COMMAND as
       an error when it is not an error.
    07.IDz COBOL parser does faulty parsing for an EVALUATE WHEN
       statement with parentheses around a constant value; the next
       line of code might be marked with a warning saying
       "Unreachable code".
    08.PL/I language support updated to PL/I 5.3, as described in
       October 2020 Compilation Technology DPP for PL/I 5.3.
       -SUBTO built-in function
       -NULLINIT changes
       -REINIT changes
       -REGEX built-in function changes
       -XML generation changes (attributes, built-in functions, etc)
       -new XMLUCHAR built-in function allows UCHAR elements,
        matching XMLCHAR for CHAR elements.
       The following link describes each PL/I APAR that introduces
       syntax changes:
       https://www.ibm.com/support/pages/fix-list-enterprise-pli-zos
    09.COBOL language support updated to 6.3, and added support
       additional syntax of the July 2020 COBOL PTF.
       The following link describes each COBOL APAR that introduces
       syntax changes: https://www.ibm.com/support/pages/fix-list-an
       d-new-features-enterprise-cobol-zos
    10.IDz code analysis enhancement to support COBOL 6.3 APAR
       PH26780 JSON PARSE and GENERATE boolean name/value pairs with
       CONVERTING option.
       Documentation for the COBOL JSON GENERATE statement with the
       new CONVERTING option https://www.ibm.com/support/knowledgece
       nter/SS6SG3_6.3.0/lr/ref/rlpsjsog.html
       Documentation for the COBOL JSON PARSE statement with the new
       CONVERTING option https://www.ibm.com/support/knowledgecenter
       /SS6SG3_6.3.0/lr/ref/rlpsjsop.html
    11.PL/I parser throws a Null Pointer Exception instead of giving
       the valid error message when there is a missing END statement
       for PL/I programs.
    12.Invalid syntax warnings for multiple generics in JSON
       GENERATE suppression that the compiler accepts. As per
       specification in COBOL Language Reference, https://www.ibm.co
       m/support/knowledgecenter/SS6SG3_6.3.0/lr/ref/rlpsjsog.html,
       suppression looping is permitted. Multiple generics should be
       supported.
    13.SECONDS-PAST-FORMATTED-TIME should show a syntax warning in
       the file while the correct function name
       SECONDS-FROM-FORMATTED-TIME, should not.
       COBOL 6.3 APAR PH31047 originally listed the function name
       incorrectly in the apar text https://www.ibm.com/support/page
       s/apar/PH31047. Reference is correct now at https://www.ibm.c
       om/support/knowledgecenter/SS6SG3_6.3.0/lr/ref/rlinfsecfrom.h
       tml
    14.Enhancement to support PL/I 5.3 NULLINIT attribute with
       STRUCT types, as documented in October 2020 Compilation
       Technology DPP for PL/I 5.3. The following is now valid:
       define struct
       1 a nullinit,
       2 a1 fixed bin(15) init(17),
       2 a2 fixed bin(15) init(29),
       2 a3 char(2);
    15.Listagg function falsely reports an error when in real time
       syntax check and leads to errors inside an EXEC SQL statement
    16.In COBOL parsing, an incorrect syntax warning message is
       issued: "The value is too long for the data element."
       The message may be issued incorrectly when when calculating
       the length of a string literal specified in the VALUE clause
       of a data item if all of the following criteria are met:
       1. the literal is intended to be the exact length specified
          in the PICTURE clause
       2. the literal is continued across multiple lines
       3. the literal contains a pair of quotation marks ("") or a
          pair of apostrophes (''), respectively, when it is also
          the character used as the opening delimiter.
    17.EXEC SQL INCLUDE statement using a copybook with the copybook
       name containing #, $, or @ characters are not perceived
       correctly in COBOL parsing.
       For example, EXEC SQL INCLUDE  $copy2 END-EXEC.
       A work around is to use a copy book file name without #, $,
       or @ characters
    18.The Software Analysis rules "AVOID USING LEVELS 88 IN DATA
       DESCRIPTION" and "USE LEVEL NUMBERS IN THE SEQUENCE 01, 05,
       10 ..." mark lines coming from IBM standard/system copybooks
       in error.
       For example, the CICS copybook DFHBMSCA contains the lines
         02  DFHBMFLG PICTURE X.
           88  DFHERASE VALUES ARE X'80', X'82'.
           88  DFHCURSR VALUES ARE X'02', X'82'.
       which is against rule "AVOID USING LEVELS 88 IN DATA
       DESCRIPTION" and so every program calling this standard
       copybook is marked in error by the software analyzer.
       Also in the CICS copybook DFHBMSCA all levels have an
       increment by 1 (01, 02, 03...) , hence every program calling
       this copybook is marked in error by the software analyzer
       because of rule "USE LEVEL NUMBERS IN THE SEQUENCE 01, 05,
       10 ..."
    

Problem conclusion

  • 01.Added COBOL Token as one the options for
       CommentEntryWithoutExec
    02.The error preprocessor embedded error (ERROR TOKEN) was
       corrected
    03.fix provided
    04.fix provided
    05.fix provided
    06.fix provided
    07.fix provided
    08.PL/I language support updated to PL/I 5.3
    09.COBOL language support updated to 6.3, and added support
       additional syntax of the July 2020 COBOL PTF
    10.New COBOL 6.3 parameters support was added to be in keeping
       with expectations and documentation
    11.The parser is changed to give the correct error message
    12.IDz no longer gives syntax errors for multiple suppression
       statements as long as they are the same type. Note if generic
       and non-generic are mixed, IDz gives syntax errors consistent
       with XML GENERATE, as the loop support only supports one type
       currently as a limitation within IDz
    13.Use the Reference version of the function syntax,
       SECONDS-FROM-FORMATTED-TIME
    14.Enhancement to support PL/I 5.3 NULLINIT attribute with
       STRUCT types
    15.Added support for listagg internal function in SQL syntax for
       EXEC SQL statements in COBOL syntax checking
    16.String literal quotation spanning multiple lines of the exact
       length of the PICTURE class are now supported correctly
    17.The parsing for COBOL now supports EXEC SQL INCLUDE
       statements using  copybooks when the copybook name may
       contain #, $, or @ characters
    18.Rules which involve copybooks will not be processed against
       standard IBM copybooks provided by the system, such as those
       from CICS, MQ, or DB2.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH36381

  • Reported component name

    SOURCE CODE ANA

  • Reported component ID

    5724T0733

  • Reported release

    E20

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-04-16

  • Closed date

    2021-04-21

  • Last modified date

    2021-05-03

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

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

    PH36548 PH36549 UI75032

Modules/Macros

  • AKGXCR03
    

Fix information

  • Fixed component name

    SOURCE CODE ANA

  • Fixed component ID

    5724T0733

Applicable component levels

  • RE20 PSY UI75032

       UP21/04/23 P F104

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.

[{"Line of Business":{"code":"LOB17","label":"Mainframe TPS"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSQ2R2","label":"Rational Developer for z Systems"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"E20"}]

Document Information

Modified date:
04 May 2021