IBM Support

PH56641: ERROR [999] : SYNTAX ERROR: 'FETCH' ERROR [999] : SYNTAX ERROR: '1' RECEIVED DURING COBOL PROGRAM BUILD

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

  • Some syntax errors occurred in 2 COBOL files, in SQL cursor
    declaration, 1st related to ORDER BY clause when in declare
    cursor, 2nd related to OPTIMIZE.
    
    
    Example 1 with below build errors:
    
    Warning [999] : Syntax error: 'DESC'
    Error [999] : Syntax error: 'FETCH'
    
    
    
    For this code:
               B.JOB_EMPL_END is NULL) and B.JOB_STA_FLG = 'Y') or
               :EZESQL-HOST-VARS.EZESQL-HST-8
               :EZESQL-HOST-VARS.EZESQL-HST-8-I = 'N' )    order by
    OU_NAME
               desc for fetch only
    
    
    
    
    Example 2 with below build error:
    
    Warning [999] : Syntax error: 'OPTIMIZE'
    Error [999] : Syntax error: '1'
    
    from this code:
               :EZESQL-HOST-VARS.EZESQL-HST-10
               :EZESQL-HOST-VARS.EZESQL-HST-10-I) and
    E.JOB_EMPL_START <=
               current date and (E.JOB_EMPL_END > current date or
               E.JOB_EMPL_END is NULL) and E.JOB_STA_FLG = 'Y'
    optimize for
               1 row
               END-EXEC.
    

Local fix

  • n/a
    

Problem summary

  • Some syntax errors occurred in 2 COBOL files, in SQL cursor
    declaration, 1st related to ORDER BY clause when in declare
    cursor, 2nd related to OPTIMIZE.
    

Problem conclusion

  • During debugging I noticed we actually have support in the
    grammar, but we had some issues in parsing the tokens, before
    applying the grammar rule.
    

Temporary fix

  • Test fix 6.1.1_iFix4_TestFix_TS013853008.zip is provided to
    customer.
    

Comments

APAR Information

  • APAR number

    PH56641

  • Reported component name

    APPL DISCOVERY

  • Reported component ID

    5737B1600

  • Reported release

    611

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2023-08-30

  • Closed date

    2023-08-30

  • Last modified date

    2023-08-30

  • 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":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSRR9Q","label":"IBM Application Discovery"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"611","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
31 August 2023