STOP IMMEDIATE

The character string STOP IMMEDIATE tells File Manager to terminate the current File Manager function without writing the current record to the primary output data set. The effect of specifying STOP IMMEDIATE on the RETURN instruction depends upon the File Manager function being used:
  • For DSC (Data Set Copy), the current record is not copied to the target data set and the function is terminated.
  • For DSP (Data Set Print), the current record is not printed and the function is terminated.
  • For DSU (Data Set Update), the current record is not updated, regardless of any changes that have been made to the data in the variable OUTREC, and the function is terminated.
  • For DSEB (Data Set Edit Batch), the current record is not updated, unless the UPDATE function has been called for the current record. In either case, the function is terminated.

If this string is returned by a REXX procedure run in conjunction with the DSC function or Data Copy Utility and where REXX member selection has been specified, it is treated as if it was a RETURN with no argument strings and a warning message is issued. Subsequent records continue to be passed to the REXX procedure until a decision has been made on whether to DROP or PROCESS the member.

Here are some examples:
RETURN 'STOP IMMEDIATE'
Return 'Stop Immediate'
Return stop immediate  /* assumes variables 'stop' and 'immediate' not assigned */