IBM Support

PI69612: RATIONAL DEVELOPER FOR SYSTEM Z (RDZ) COBOL PARSER MAY THROW ARRAYINDEXOUTOFBOUNDSEXCEPTION FOR PROGRAMS ON COPY/REPLACING

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Rational Developer for System z - RDz
    COBOL parser may throw a Java Array IndexOutOfBounds Exception
    for programs that use COPY... REPLACING statements.
    
    This problem may occur in either the COBOL editor or the
    System z LPEX editor for a COBOL program.
    
    You may see a popup dialog when you attempt to save a
    program stating:
    An error dialog opens:
    Save Failed  Index: 5870, Size: 5870
    
    You may see a similar condition when you add the OCCURS
    multiple times to a copybook while in one of the editors.
    
    In this case if you add the OCCURS 300 times then you may
    see that all references to fields in copybook TEST03 get
    "UNABLE TO RESOLVE REFERENCE".  Below is the code in the
    program:
        COPY TEST03.
    
    In the copybook it has:
           copy TEST03 replacing == 03 pCapability ==
                  by == 03 pCapability OCCURS 300 TIMES ==.
    
    
    Below is an example of a stack trace found in one case:
    Stack trace in .trace file:
    java.lang.ArrayIndexOutOfBoundsException
      at java.util.ArrayList.elementData(ArrayList.java:429)
      at java.util.ArrayList.get(ArrayList.java:442)
      at com.ibm.systemz.cobol.editor.core.parser.CobolPrsStream.
                        getReplaceStrings(CobolPrsStream.java:474)
      at com.ibm.systemz.cobol.editor.core.parser.CobolPrsStream.
                    getAffectedTokenRange(CobolPrsStream.java:811)
      at com.ibm.systemz.common.editor.parse.SectionedPrsStream.
               prepareIncrementalLex(SectionedPrsStream.java:2275)
      at com.ibm.systemz.cobol.editor.core.parser.CobolPrsStream.
                    prepareIncrementalLex(CobolPrsStream.java:259)
      at com.ibm.systemz.common.editor.parse.SectionedLexer.
                         doIncrementalLex(SectionedLexer.java:240)
      at com.ibm.systemz.cobol.editor.jface.parse.
                   CobolEditorParseController$1.doIncrementalLex
                              (CobolEditorParseController.java:188)
      at com.ibm.systemz.common.editor.parse.SectionedLexer.
                          incrementalLexer(SectionedLexer.java:266)
      at com.ibm.systemz.common.editor.parse.SectionedLexer.lexer
                                          (SectionedLexer.java:335)
      at com.ibm.systemz.common.editor.parse.
                                   SectionedParseController.parse
                                (SectionedParseController.java:274)
      at com.ibm.systemz.common.editor.parse.
                                  SectionedParseController.parse
                                (SectionedParseController.java:420)
      at com.ibm.systemz.common.jface.editor.parse.
         ReconcilingStrategy.parseAll(ReconcilingStrategy.java:206)
      at com.ibm.systemz.common.jface.editor.parse.
        ReconcilingStrategy.reconcile(ReconcilingStrategy.java:126)
      at org.eclipse.jface.text.reconciler.MonoReconciler.
                                    process(MonoReconciler.java:77)
      at com.ibm.systemz.common.jface.editor.parse.Reconciler.
                                       process(Reconciler.java:169)
      at org.eclipse.jface.text.reconciler.
                         AbstractReconciler$BackgroundThread.run
                                      (AbstractReconciler.java:206)
    

Local fix

  • None Avaliable
    

Problem summary

  • COBOL parser may throw ArrayIndexOutOfBoundsException for
    programs on COPY/REPLACING.
    

Problem conclusion

  • Modified COBOL parser to correctly keep track of location on
    COPY/REPLACING.
    
    The problem listed in this APAR has been resolved with
    IBM Rational Developer for z Systems V9.5.1.2 Fix Pack which
    is available from the Recommended Fixes support download page:
    http://www-1.ibm.com/support/docview.wss?rs=2294&uid=swg27006335
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI69612

  • Reported component name

    RATL DEV FOR SY

  • Reported component ID

    5724T0700

  • Reported release

    951

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-09-22

  • Closed date

    2016-10-27

  • Last modified date

    2016-10-27

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

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

Fix information

  • Fixed component name

    RATL DEV FOR SY

  • Fixed component ID

    5724T0700

Applicable component levels

  • R951 PSY

       UP



Document information

More support for: Rational Developer for System z

Software version: 951

Reference #: PI69612

Modified date: 27 October 2016