The character string STOP tells Z Data Tools to terminate the current Z Data Tools function after the current record has been written to the primary output data set. The effect of specifying STOP on the RETURN instruction depends upon the Z Data Tools function or panel being used:
  • For DSC or Copy Utility (option 3.3), the current record is copied to the target data set and the function is terminated.
  • For DSP or Print Utility (option 3.2), the current record is printed and the function is terminated.
  • For DSU, the current record is updated if the data in the variable OUTREC has been changed, and the function is terminated.
  • For DSEB, 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'
Return stop  /* assumes no variable named 'stop' has been assigned */