Informix

 View Only
  • 1.  raise exception error_text 70 char long

    Posted Thu January 28, 2021 09:11 AM
    Hi guys,
    Does anybody know how to make error_text longer than default 70 characters when used in a raise exception -746, isam_error, error_text ?
    When a return a error_text it is truncated to 70 chars no matter  how long I define the variable inside the stored procedure.

    ------------------------------
    juan luis roca
    ------------------------------

    #Informix


  • 2.  RE: raise exception error_text 70 char long

    IBM Champion
    Posted Thu January 28, 2021 11:05 AM
    Juan:

    The length of the error message is constrained by the design of the sqlca exception handling data structure's sqlerrm field which is defined as char[72] for Informix database connections. The only way around it would be to use your own error message table in the same way that Informix uses the .iem files in the $INFORMIXDIR/msg/en_us/0333 directory. You can use the ISAM error field to return a message lookup key and retrieve longer messages from there.



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 3.  RE: raise exception error_text 70 char long

    Posted Thu January 28, 2021 11:15 AM
    Thanks a lot Art. I'll take your advise.