IBM Support

PH42505: 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

  • Code Analysis internal defects and enhancements
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: 01.Customers with threshold values that      *
    *                    are set to 1000 or greater using the      *
    *                    UI to set or generate rules values.       *
    *                 02.COBOL developers on COBOL 6.4 latest      *
    *                    PTFs                                      *
    *                 03.All COBOL code review users               *
    *                 04.COBOL developers with special             *
    *                    characters in variables                   *
    *                 05.COBOL developers using REPLACING          *
    *                 06.Those COBOL Developer with REPLACING      *
    *                    that may have the same leading and        *
    *                    trailing as the same value.               *
    *                 07.COBOL Compiler option users               *
    *                 08.Users with COBOL files referencing        *
    *                    many copybooks                            *
    *                 09.COBOL developers using REPLACING          *
    *                 10.PL/I developers                           *
    *                 11.PL/1 users with multilevel                *
    *                    definition structure                      *
    *                 12.COBOL users                               *
    *                 13.COBOL users with compiler options         *
    *                 14.COBOL users                               *
    *                 15.PL/I with preprocessing                   *
    *                 16.COBOL users with small name variables     *
    ****************************************************************
    * PROBLEM DESCRIPTION: 01.Threshold values above 999 may have  *
    *                         errors based on the thousands place  *
    *                         separator.                           *
    *                      02.If using the new COBOL directives    *
    *                         prior to this change, they were not  *
    *                         showing as supported in IDz.         *
    *                      03.Unreachable code not flagged for     *
    *                         EXIT SECTION, EXIT PARAGRAPH,        *
    *                         EXIT PERFORM, or EXIT PERFORM CYCLE  *
    *                      04.COBOL parser should not throw an     *
    *                         Error Token.                         *
    *                      05.replacement character recognition    *
    *                         has flaws causing circular           *
    *                         replacement or incorrect replacement *
    *                         due to LEADING placement.            *
    *                      06.correction to APAR PH30798           *
    *                      07.IGY-LP COBOL compilation variable    *
    *                         not recognized, or defined.          *
    *                      08.Performance issues due to            *
    *                         incremental parse of syntactically   *
    *                         incorrect COBOL in main COBOL or     *
    *                         COPYBOOKS. There is a message for    *
    *                         each  >>IF IGY-LP  that the "IGY-LP  *
    *                         is not defined." but if there is no  *
    *                         compiler option specified, LP(32) is *
    *                         assumed so by default the variable   *
    *                         is defined.                          *
    *                      09.Following the compiler behavior,     *
    *                         there should only be one replacement *
    *                         per word. Overlapping 2 partial      *
    *                         replace statements on the same line  *
    *                         with no overlap only the first       *
    *                         leading is replaced and not the      *
    *                         trailing part of the statement. If   *
    *                         there are overlapping leading or     *
    *                         trailing replaces, then exec once    *
    *                         again only replaces only the first   *
    *                         leading statement.                   *
    *                      10.IDz does not recognize PLI include   *
    *                         SYNONYMS that are lowercase or Mixed *
    *                         case.                                *
    *                      11.An element can be viewed as          *
    *                         unambiguous if the reference is not  *
    *                         a partially or fully qualified       *
    *                         reference to any other variable in   *
    *                         the block where the element is       *
    *                         declared. A name stack should keep   *
    *                         track of the variables to be checked *
    *                         for ambiguous/invalid reference such *
    *                         that where the ambiguity is          *
    *                         resolvable when it is used           *
    *                      12.Syntax errors in large files         *
    *                         happening in specific locations of   *
    *                         the program caused the parser to     *
    *                         take an unreasonably long time to    *
    *                         fail and display an error.           *
    *                      13.An error or erratic response may     *
    *                         occur when SPACE is explicitly       *
    *                         expressed as a COBOL compiler option *
    *                      14.Add missing COBOL compiler options   *
    *                      15.Blank spaces in the code shows as    *
    *                         incorrect.                           *
    *                      16.incorrect LEX for JSON GENERATE      *
    *                         "count in" statement                 *
    *                         json generate jx from g              *
    *                                    count i name g is omitted *
    ****************************************************************
    01.Using the Halstead Metrics rules, Program vocabulary size,
       the threshold values > 999 vanishes after apply and close.
       The higher value can be set but the result is not usable to
       know what values the programs are really checked. From
       Software Analyzer Configuration, create a ruleset and select:
       'COBOL Software Metrics' - 'Halstead Metrics' -
       'Program vocabulary size'
       There, you can tick-mark 'Analyze the threshold' and set the
       Maximum program vocabulary allowed in a program, at 9000.
       Press Apply and Close. But when you go to the same place
       again, the tick-mark and the value are gone.
    02.The September COBOL PTF added new directives for data items
       in mixed AMODE 31/64 support in COBOL, >>DATA 64 and
       >>DATA 31, that need to be added to IDz
    03.Incorrect Unreachable Code with some EXIT Instructions
    04.The user includes two different variables in the COBOL:
       DB2LVE.LVE_..., which has a period (.) after DB2LVE and
       DB2LVE-LVE_..., which has a hyphen (-) after DB2LVE.
       Both are valid variables. However, COBOL parser does not
       recognize the variable followed by a period (DB2LVE.LVE_...).
       This can result in the following error message:
       Multiple markers at this line "ERROR_TOKEN" unexpected tokens
       ignored and "IN" expected instead of this input.
    05.Incorrect syntax error with REPLACE LEADING statement. These
       statements in a COBOL program will show this issue:
       01 COPY1.
         COPY S98D557C REPLACING LEADING ==SAWX-== BY ==BER-==
         ==BER-== by ==XYZ-==.
       *************************************************************
       01 WS-DATEN.
         COPY S98D557C REPLACING LEADING ==SAWX-== BY ==BER-==
         ==:sawx-:== by ==ber-== .
    06.Correction to APAR PH30798; Unnecessary warning message.
       This is a valid formulation of syntax.
    07.Add support for IGY-LP Variable which was added in COBOL 6.3
    08.Occasional locking on the main thread while waiting for a
       lock on the parse tree that it could not get while
       incremental parse was taking place. Incremental parse also
       has a minor bug that resulted in the parsing state becoming
       out of sync.
    09.There are certain circumstances where there can be more than
       one possible replacement per word. For example, no
       replacement for the year and syntax errors for
       REPLACING ==:PREFIX:== BY ==WS== ==:YR:== BY ==xxxx==.
       You could have more than one replacement per word when the
       replacement words are surrounded with ":". The replacements
       do not take place when the words are not surrounded by ":".
       When there is overlapping leading and trailing, only the
       first leading or trailing is replaced and not the second part
       of the statement.
    10.IDz parsing does not recognize -INC or ++INCLUDE PLI include
       SYNONYMS that are lowercase or Mixed case.
    11.There are incorrect "Ambiguous Reference" messages marked in
       the file. The messages originate from a multi-level structure
       that contains the same name on different levels. The
       referenced element is not ambiguous in this case. For example
       SOME: PROC ;
       DCL
         1 S1,
           3 S1,
             5 C1 CHAR(1) INIT('A');
       PUT SKIP LIST(S1.C1);
       END SOME;
       This example code compiles with no errors or warnings so the
       PL/I editor should not mark any errors.
    12.IDz syntax parsing takes a long time to complete when COBOL
       program has syntax errors. Program contains this error:
           ACT1NSPP-HY31L4-CH-SOC.
               IF SSI000-TYP-DSA = 'INC'
               AND (WS-TYP-FRANCH = 'CHARSOC'
                      AND WS-TYP-FRANCH = 'XXXXXXX'
       The error is the missing ")" at the end of last line.
    13.When the compiler option SPACE(1) is enabled, the line
       "Process SPACE(1)" is not parsed. As a result, the program
       control flow view cannot be opened because the file cannot
       be parsed.
    14.https://www.ibm.com/docs/en/cobol-zos/6.3?topic=program-compi
       ler-options  Compiler Options added:
       a. VLR(STANDARD): https://www.ibm.com/docs/en/cobol-zos/6.3?t
          opic=options-vlr
       b. PROCESS OFF: https://www.ibm.com/docs/en/cobol-zos/6.3?top
          ic=options-offset
    15.Blank characters (spaces/tabs/newlines) in a dek file of a
       PL/I source and preprocessing the PL/I source with the
       changed dek file results in showing vertical bars next to
       those lines in the PL/I source, which is incorrect.
    16.G is treated as a special keyword, incorrectly.
    

Problem conclusion

  • 01.Values must be manually set correctly if not using this fix,
       otherwise access and change the value in  IDz15.0.3
    02.The new directive for data items in mixed AMODE 31/64 support
       in COBOL>>DATA 64 and >>DATA 31 is resolved with this change.
    03.These Exits needed to be enabled in the analytics.
    04.Problem is rectified in the IDz COBOL parsing.
    05.LEADING and trailing REPLACING support was updated in IDz
       COBOL parsing to fix this issue.
    06.Removing warning message.
    07.No syntax error message for IGY-LP variable given, if it is
       not provided in the property group because it is set to
       LP(32) by default.
    08.Issues have been corrected. No action for end user.
    09.Correct replacements are used for parsing and code review,
       following the compiler example.
    10.IDz is corrected to recognize PLI include SYNONYMS that are
       lowercase or Mixed case.
    11.Correction in the IDz PL/I parser to resolve issue with
       ambiguity.
    12.Limited the number of backtracks that will be done when
       parsing to avoid long wait times introduced by ambiguities
       in the COBOL language.
    13.SPACE was not listed as one of the options for the process
       options list. So, when the compiler option contains SPACE(1)
       the code does not recognize it. So, SPACE is added as one of
       the options.
    14.Compiler options were made available
    15.There should be no bars for whitespaces.
    16.correct the lexing in the COBOL parsing.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH42505

  • 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-12-02

  • Closed date

    2021-12-02

  • Last modified date

    2022-01-04

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

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

    PH42525 PH42526 UI78377

Modules/Macros

  • AKGCCINI AKGCCX   AKGCRX   AKGFT001 AKGFT002 AKGFT003 AKGFT004
    AKGFT005 AKGFT006 AKGXCC01 AKGXCR01 AKGXCR02 AKGXCR03 AKGXCR04
    AKGXCR05 AKGXCR06 AKGXCR07 AKGXCR08
    

Fix information

  • Fixed component name

    SOURCE CODE ANA

  • Fixed component ID

    5724T0733

Applicable component levels

  • RE20 PSY UI78377

       UP21/12/04 P F112

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 System z"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"E20"}]

Document Information

Modified date:
05 January 2022