EXIT CM

PURPOSE:  The EXIT CM statement terminates execution of the current Command Module and returns control to the calling Command Module if there is one.  This statement can be combined with conditional block control statements to provide for conditional termination of a CM.

SYNTAX

EXIT CM

NOTES:  If the Command Module that contains the EXIT CM statement was called from another Command Module, control is passed to the calling CM.  To exit all nested CM's and return control to the terminal, use the USE NO CM. 

The EXIT CM statement is not needed for normal CM termination.  When the last statement in a CM has finished executing, the CM is closed and control is returned whence it came.