Choosing the right function to enhance
With enhanced processing it can be unclear which function or panel to invoke for a particular task, and what combination of template, DFSORT and REXX (or FASTREXX) processing is best to use.
Typically, you get the best performance by using the function or panel that requires the least enhancement to perform the task, and by using the best-performing enhancement technique that can provide the desired result.
For more information about performance considerations, see Choosing between FASTREXX, REXX, and DFSORT for your procedure.
- DSC function or Copy Utility (option 3.3)
- First, consider whether you can perform the copying task by enhancing the function or panel with
FASTREXX or DFSORT statements in a procedure. A task performed with only FASTREXX or DFSORT uses far
less system resources than the equivalent task performed with REXX or template processing that
requires REXX.
If neither FASTREXX nor DFSORT is suitable for the copying task, before resorting to using REXX, consider whether the task can be performed with template processing that does not require REXX. You can also use template processing for selecting, reformatting, and initializing records, and it uses less system resources than the equivalent task performed with REXX in a procedure. If you are using templates for record selection, try to code selection expressions that exploit the power of the File Manager internal expression processor, avoiding the need to invoke REXX to process the expressions (see About expression processing).
- DSP function or Print Utility (option 3.2)
- As with copying, you can use FASTREXX or DFSORT procedures or
templates to help perform complex printing tasks without the overhead
of external REXX processing. Using FASTREXX, DFSORT, or a template,
you can specify complex criteria to select only certain records, and
which fields from those records to print.
In some cases, you might want to use DSC or the Copy Utility (option 3.3) to reformat the fields in a data set and copy the reformatted fields to a new data set, before using DSP or the Print Utility (option 3.2) to print the new data set.
- DSEB function (not available in panels)
- DSEB is the only function where you can move forwards and backwards through the records in a
data set, rather than dealing with each record independently, in sequence. Use DSEB when you need to
compare values in different records, or where you need the flexibility to scroll or search forwards
or backwards through a data set. Note that DSEB only lets you
edit in place
; You cannot insert or delete a record or change a record's length.DSEB has no default action of its own, such as printing or copying; you must supply a procedure containing REXX statements to perform whatever actions you require.
Before you decide to use DSEB, consider whether you can use DSU. DSU is faster than DSEB, especially with FASTREXX.
Note: FASTREXX processing is not supported for the DSEB function. - DSU function (not available in panels)
- DSU is a general-purpose function for working with each record in a data set independently, in
sequence. DSU is the same as the FCH function or the Find/Change Utility (option 3.6), except that
DSU does not produce a report. Use DSU when you want to examine and potentially update each record,
without needing to move backwards through the records or compare values of different records.
However, before you decide to use DSU, consider whether you can use a combination of the primary
commands available with the FCH function and the Find/Change Utility.
DSU only lets you
edit in place
. That is, you cannot insert or delete a record, or change a record's length.DSU has no default action of its own, such as printing or copying; you must supply a procedure containing REXX statements to perform whatever actions you require.
- FCH function or Find/Change Utility (option 3.6)
- When using this function or panel, you can either supply a procedure containing REXX statements (as described in this chapter), or a sequence of primary commands (such as FIND and CHANGE; for details, see Finding and changing data in multiple PDS members and FCH (Find/Change)). For better performance, use the primary commands instead of a REXX procedure wherever possible.