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 File Manager cause excessive CPU usage.
- Run with the REXX compiler
- Compiled REXX runs considerably faster than interpreted REXX.
However, because File Manager modifies the REXX you supply to run
in the File Manager environment, you cannot supply pre-compiled REXX
code. Instead, by supplying the DD card for the REXX compiler library,
you instruct File Manager to compile your REXX before running it.
This approach reduces CPU usage and run time. File Manager runs the compiler when you allocate the data set containing your REXX compiler to the DD name FMNRXCMP. For example, in batch, use the following JCL DD statement:
When running a procedure from a panel, you can enter a TSO ALLOC command on the Command line. For example,//FMNRXCMP DD DSN=rexx.compiler.loadlib,DISP=SHR
TSO ALLOC DD(FMNRXCMP) DSN('rexx.compiler.loadlib') SHR
The REXX compiler has no effect on DFSORT or FASTREXX processing.