Contents - Index


 

 

ProcExit may also be entered as Exit.

 

Required Operands

 

CODE will be assigned to SIBRETCD before exiting.  If CODE is not specified, SIBRETCD is set to OK before exiting.

 

MSG will be assigned to SIBMSG before exiting.  If MSG is not specified, no assignment to SIBMSG is made.  The SIBMSG contents are normally displayed on the information line.

 

 

Return Codes

 

OK Successful.

 

If a procedure executes another procedure (or command) and wishes to use the CODE and/or MSG returned by EXIT, it must do so in the very next command following, since that command will set its own return code and message, overwriting what was returned.

 

When a procedure is executed as an online command, the command which invoked it will remain on the command line after EXIT if CODE is not returned as "OK".  If MSG is not returned, the normal status line will be displayed.  If MSG is returned with an asterisk (*) in character 12, it will be displayed in high intensity.

 

Examples

 

The following is typical of how EXIT might be used within a procedure to handle a "member not found" situation:

 

 ------------------------------------------------------------------------

 SET PPDCOND,1

 SET PPDVBL,1

 DECLARE MEM,CHAR,33,V

 PARSE MEM

 READ &MEM

 IF SIBRETCD,NE,OK

     EXIT NF,'(OMPSM3XA) ** MEMBER "&TXMPATH" DOES NOT EXIST **'

 ------------------------------------------------------------------------