Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    1

    Unanswered: Raiseerror DB2 cobol stored procedures

    Hi,

    I need to exit a *cobol* stored procedure with an error code.

    My first idea was to write in the SQLCA but it doesn't work.

    In others databases, i could use raiseerror to 'raise the error' but how to do in COBOL db2 ?

    Thx.

    Olivier

  2. #2
    Join Date
    Apr 2004
    Posts
    1

    Post

    The standard my applications follow is to pass the return codes as such:

    OUT RETURN_CODE INTEGER,
    OUT REASON_CODE CHAR(8),
    OUT ERROR_TEXT VARCHAR(2000),
    OUT SP_SQLCODE INTEGER,
    OUT SP_SQLTOKENS CHAR(70),
    OUT SP_SQLSTATE CHAR(5)

    Robert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •