IBM Support

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

  • n/a
    

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 System z V9.1.1.5 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

    PI70643

  • Reported component name

    RATL DEV FOR SY

  • Reported component ID

    5724T0700

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-10-13

  • Closed date

    2017-01-25

  • Last modified date

    2017-01-25

  • 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

  • R911 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSTRMM","label":"IBM Developer for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
19 October 2021