IBM Support

PI20306: RATIONAL DEVELOPER FOR SYSTEM Z (RDZ): COBOL PROGRAM WITH SEVERAL SECTIONS MAY END UP WITH A 'MISPLACED CONSTRUCT' ERROR.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Rational Developer for System z - RDz - V9.0.1
    
    A program containing several COBOL sections (SECTION statement),
    may show a 'Misplaced construct' error.
    
    Re-creation steps:
    1- create a new cbl file,
    2- copy the following lines in that file, and save it:
           Identification Division.
           Program-ID.  TESTA.
           Data Division.
           Working-Storage Section.
           01  SAS-SUBCODE-CTR                 PIC 9(02).
           01  SWS-TABLE.
           05  SWS-ROOT-SEG
               OCCURS 01 TO 5 TIMES DEPENDING ON SAS-SUBCODE-CTR
               INDEXED BY SWS-IDX.
               10  SWS-AWPD-DATA       OCCURS 2 TIMES.
                   15  SWS-AWPD-ID     PIC X(03).
                   15  SWS-O-BAL       PIC S9(05)V99    COMP-3.
           Procedure Division.
           MAINLINE.
               MOVE 4 TO SAS-SUBCODE-CTR.
               SET SWS-IDX TO 1.
               MOVE 5 TO SWS-O-BAL(SWS-IDX,2).
           MAINLINE-END.
               EXIT.
           ABORT SECTION.
           ABORT-EXIT. EXIT.
           STOP-RUN SECTION.
                      GOBACK.
           STOP-RUN-END. EXIT.
    
    The 'Misplaced construct' error is still there.
    
    3- select the 2 following lines
           ABORT SECTION.
           ABORT-EXIT. EXIT.
    and enter CTRL+SHIFT+/ to set them as comments. This last action
    
    removes the 'Misplaced construct' error.
    
    4- enter CTRL+SHIFT+/ again, the 'Misplaced construct' error
    comes back.
    

Local fix

Problem summary

  • The problem is that the parser does not recognize the comma in
    the subscript (SWS-IDX,2) as an appropriate separator when there
    is no space after the comma.
    

Problem conclusion

  • The parser has been fixed so that it would recognize the comma
    in the subscript (SWS-IDX,2) as an appropriate separator even
    when there is no space after the comma.
    
    The problem listed in this APAR has been resolved with
    IBM Rational Developer for System z V9.0.1.4 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

    PI20306

  • Reported component name

    RATL DEV FOR SY

  • Reported component ID

    5724T0700

  • Reported release

    901

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-06-18

  • Closed date

    2015-06-04

  • Last modified date

    2015-06-04

  • 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

  • R901 PSY

       UP



Document information

More support for: Rational Developer for System z

Software version: 901

Reference #: PI20306

Modified date: 04 June 2015