IBM Support

PM32785: sqlcode -503 on EGL sql statement

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following  egl code generates incorrect Cobol:
    
    Function AQA340P()
      MAFAMS.MKULTOP = 'AQA340P - UPDATE TA192';
      try
        get TA1920R forUpdate AQA340P_RSI01
          with #sql{
            select NUMDNI, DNI, NIF, NOMBRE, FECALT, CODSIT, FECINC
            from sqlexp.ta192 T1
            WHERE
             NUMDNI = :GNUMDNI
            for update of DNI, NIF, NOMBRE, FECALT, CODSIT, FECINC
          }
          into GNUMDNI, GDNI, GNIF, GNOMBRE1, GFECALT,
               GCODSIT, GFECINC ;
        onException AQA300G() ;
      end
    end // end AQA340P
    
    The Db2 bind step fails with sqlcode -503.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The Select statement on the GET was modified to exclude some
    columns from the selection. The replace statement was using
    a default SET clause. Because of this, the SET clause
    contained columns that were not actually retrieved for
    update, causing a -503 during the bind step.
    

Problem conclusion

  • Because this is actually a problem that affects COBOL and
    Java/Debug, the fix was a change to the preprocessor. For
    replace satements that contain a default SET clause, and
    whose matching Get for Update contain a user modified SQL
    statement, the columns on the default SET clause are
    modified to only contain those (non-ReadOnly, non-Key)
    columns that were received into the INTO clause.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM32785

  • Reported component name

    RATL BUS DEV

  • Reported component ID

    5724S5000

  • Reported release

    751

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-02-15

  • Closed date

    2011-05-06

  • Last modified date

    2011-05-06

  • 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 BUS DEV

  • Fixed component ID

    5724S5000

Applicable component levels

  • R751 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
06 May 2011