IBM Support

PH66675: NATURAL SYNTAX ERROR: 'PARSE ERROR, EXPECTING `TOP' OR `BOTTOM' OR `MODULE' OR `ROUTINE' WHEN ENCOUNTERING TOKEN

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • NATURAL programs getting errors as below:
    Syntax error: 'parse error, expecting `TOP' or `BOTTOM' or
    `MODULE' or `ROUTINE' when encountering token: IF or: IF'
    Syntax error: 'parse error, expecting `TOP' or `BOTTOM' or
    `MODULE' or `ROUTINE' when encountering token: MOVE or: MOVE'
    Syntax error: 'parse error, expecting `TOP' or `BOTTOM' or
    `MODULE' or `ROUTINE' when encountering token: DELETE or:
    DELETE'
    

Local fix

  • n/a
    

Problem summary

  • When building a natural program, an error was thrown:
    Syntax error: 'parse error, expecting `TOP' or `BOTTOM' or
    `MODULE' or `ROUTINE' when encountering token: DELETE or:
    DELETE'
    

Problem conclusion

  • ome code changes have been made, and the error does not appear
    anymore.
    
    
    
    In this case, the programs containing this  issue had to be put
    in a 'Natural' virtual folder having a "Reporting mode" set as
    its compiling mode property.
    
    This is necessary because of a 'READ... LOOP' statement, and of
    an 'IF' without END-IF statements, specific syntaxes  for the
    compiling reporting mode only.
    
    We must take care of these project logistics details, because
    the natural compiler treats differently the structured and
    reporting cases.
    
    -----
    
    A folder must be set in the "Structured mode"  if there was a
    statement like "READ... END-READ", or "IF... END-IF", or a
    "DEFINE DATA... END_DEFINE" section. There are also other syntax
    differences delimitating this categorizing.
    
    One can set a folder to the "Reporting mode" from the  AD
    project main menu:
     ->  on the tab named" Project"         -> "Settings" option
          ->right-click on the wanted folder to set
    
     -> check the "Report Mode" option in the right part of the
    "Settings" window
    
    (If it's necessary to set a folder to the "Structured mode", it
    is also possible here, by checking the "Structured mode"
    option).
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH66675

  • Reported component name

    APPL DISCOVERY

  • Reported component ID

    5737B1600

  • Reported release

    613

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2025-05-22

  • Closed date

    2025-05-22

  • Last modified date

    2025-05-22

  • 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

    APPL DISCOVERY

  • Fixed component ID

    5737B1600

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSRR9Q","label":"IBM Application Discovery"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"613","Line of Business":{"code":"LOB70","label":"Z TPS"}}]

Document Information

Modified date:
23 May 2025