If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Raiseerror DB2 cobol stored procedures

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-04, 04:00
palinf palinf is offline
Registered User
 
Join Date: Apr 2004
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 04-22-04, 17:03
Rsiniakin Rsiniakin is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On