IBM Support

PM15638: sql error -302 when updating sql record

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • User is running a Cobol program generated with Rational Business
    Developer 7.5.1.5
    
    The program performs a "get" on an sql record which has a
    VARCHAR
    column. At runtime, an INSERT fails with sql code -302
    because the length assigned to the host variable does not
    match the actual column length.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The problem was that for get next sql statements, the logic
    didn't detect all variable length sql variables, and because
    of that avoided adding the additional logic to clear the
    trailing end of the variable length field to spaces. When
    this uncleared variable was moved around by the program's
    logic, garbage was moved along with it. When the logic to
    replace the sql field was finally triggered, it would scan
    the field from the end, backwards, counting trailing spaces
    to determine the variable length to tell sql. The garbage at
    the end of the field was causing the length to be invalid.
    

Problem conclusion

  • Software updated. Fixtest available.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM15638

  • 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

    2010-06-01

  • Closed date

    2010-10-13

  • Last modified date

    2010-10-13

  • 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:
13 October 2010