Performance tips

Make your REXX procedures FASTREXX eligible
Look for a way to code your requirements using FASTREXX wherever possible. You can test your existing procedures to see if they are FASTREXX eligible by using the *FASTREXX CHECK or *FASTREXX NORUN statements.
Use DFSORT for performance-critical jobs
DFSORT processing is more efficient than FASTREXX and significantly more efficient than REXX. See Choosing between FASTREXX, REXX, and DFSORT for your procedure.

For maximum efficiency when mixing DFSORT and REXX statements, where appropriate:

  • Use DFSORT in preference to REXX when you can achieve the same result from either.
  • Use DFSORT INCLUDE or OMIT statements to restrict the amount of REXX processing to be done by restricting the number of calls to REXX.
  • Write multiple output files by using DFSORT OUTFIL rather than REXX write statements.
  • Be prepared to use two passes through the data, rather than one, if that would make processing more efficient.
  • Make the REXX part of your procedures FASTREXX eligible wherever possible.
Do not use EXITs in REXX
Use RETURN to terminate all your REXX processing. Do not use EXIT statements. EXIT statements in REXX used with Z Data Tools cause excessive CPU usage.
Run with the REXX compiler
Compiled REXX runs considerably faster than interpreted REXX. However, because Z Data Tools modifies the REXX you supply to run in the Z Data Tools environment, you cannot supply pre-compiled REXX code. Instead, by supplying the DD card for the REXX compiler library, you instruct Z Data Tools to compile your REXX before running it. This approach reduces CPU usage and run time.
Z Data Tools runs the compiler when you allocate the data set containing your REXX compiler to the DD name HFMRXCMP. For example, in batch, use the following JCL DD statement:
//HFMRXCMP DD DSN=rexx.compiler.loadlib,DISP=SHR
When running a procedure from a panel, you can enter a TSO ALLOC command on the Command line. For example,
TSO ALLOC DD(HFMRXCMP) DSN('rexx.compiler.loadlib') SHR

The REXX compiler has no effect on DFSORT or FASTREXX processing.