Hierarchy
⤷ BC-DB-DB2 (Application Component) DB2 for z/OS
⤷ STU2 (Package) CCMS for DB2 for OS/390
Basic Data
Data Element | DB2CCRETURN |
Short Description | Return code of stored procedure |
Data Type
Category of Dictionary Type | Direct Type Entry | |
Type of Object Referenced | No Information | |
Domain / Name of Reference Type | ||
Data Type | INT4 | 4-byte integer, integer number with sign |
Length | 10 | |
Decimal Places | 0 | |
Output Length | 11 | |
Value Table |
Further Characteristics
Search Help: Name | ||
Search Help: Parameters | ||
Parameter ID | ||
Default Component name | ||
Change document | ||
No Input History | ||
Basic direction is set to LTR | ||
No BIDI Filtering |
Field Label
Length | Field Label | |
Short | 2 | RC |
Medium | 11 | Return code |
Long | 31 | Return code of stored procedure |
Heading | 31 | Return code of stored procedure |
Documentation
Definition
Return code of the stored procedure. The most common values are:
Return code Meaning
0 Successful execution
4 Warning. Please see message to determine the cause. It is normally considered harmless, to ignore the warning.
8 Error. Please see message to determine the cause. You will have to remove the problem, before trying to execute again.
12 Severe error. Please see message to determine the cause. You will have to remove the problem, before trying to execute again.
Hex0004E000 An ABEND occurred. Please see message to determine the cause. You will have to remove the problem, before trying to execute again.
Troubleshooting tips
Stored procedures are a piece of code that is written in an external programming language. They run under control of the DB2 server and are invoked via the SQL CALL statement. DB2 considers them to be entities like a database, so they can be stopped and started. If the return code of the SP indicates an error, but the according message is not very informative, you should check, if the SP itself is stopped, or the address space, in which the SP is running:
- You can display the status of a SP with the DB2 command
-DISPLAY PROC(*)
If its status is not active/started, then you should issue DB2 command
-START PROC(procedure_name) - You can get the name of the address space, in which the SP is running, with the help of the following catalog query
SELECT WLM_ENVIRONMENT
FROM SYSIBM.SYSROUTINES
WHERE NAME = procedure_name - If the result is blank, the SP runs in the DB2 stored procedure address space, named ssnmSPAS. It is unusual, that this address space terminates without terminating the whole DB2 subsystem. You can get further error information by selecting the address space in a TSO session.
- If the result is a name, then the SP runs in a WLM-established address space. The advantage is, that SPs can be called many times and WLM coordinates their execution in isolated address spaces. You can see, if the WLM address space is running correctly as follows:
/D WLM,APPLENV=wlm_environment
The state of the address space should be AVAILABLE, otherwise start the address space as follows:
/V WLM,APPLENV=wlm_environment,RESUME
History
Last changed by/on | SAP | 20130604 |
SAP Release Created in | 620 |