DB2 graphic QMF Version 8

Command interface return codes

Return codes for the command interface are the same regardless of the language of your application. The return code can be positive or zero. A value of zero indicates successful execution. A positive value indicates that the execution failed or was in some way abnormal.

Return codes appear in a variable in the user's exec or CLIST. If you run a REXX exec, the return code is in the REXX variable called RC; if you run a CLIST, the return code is in the CLIST variable &LASTCC.

The following example shows an exec that examines a return code.

Example

Your application contains the following code:

ADDRESS ISPEXEC SELECT PGM(DSQCCI) PARM(RUN QUERYA (FORM=FORMA))
Select
  When (RC = 0)  Then nop
  When (RC = 64) Then
      Say "You must run QMF with ISPF to use command interface."
  When (RC = 100) Then
      Say "You need to start QMF before you begin your application"
  Otherwise
      Say "Unexpected error ("RC") from QMF command interface."
End

The code runs a query and then tests for an error using REXX RC.

You can place code for handling errors in program modules as well as in execs or CLISTs.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004