Use the EXIT statement to end script processing.
About this task
The following example uses the IF clause together with RC_OK to determine
if clients are accessing the server. If a RC_OK return code is received, this
indicates that client sessions are accessing the server. The script proceeds
with the exit statement, and the backup does not start.
/* Back up storage pools if clients are not accessing the server */
select * from sessions
/* There are sessions if rc_ok is received */
if(rc_ok) exit
backup stg backuppool copypool