MERGE control statement
The MERGE control statement must be used when a merge operation is to be performed; this statement describes the control fields in the input records on which the input data sets have previously been sorted.
A MERGE statement can also be used to specify a copy application. User labels will not be copied to the output data sets.
You can merge up to 100 data sets with Blockset merge or up to 16 data sets with Conventional merge. If Blockset merge is not selected, you can use a SORTDIAG DD statement to force message ICE800I, which gives a code indicating why Blockset could not be used.
The way in which DFSORT processes short MERGE control fields depends on the setting for VLSHRT/NOVLSHRT. A short field is one where the variable-length record is too short to contain the entire field, that is, the field extends beyond the record. For details about merging short records, see the discussion of the VLSHRT and NOVLSHRT options in OPTION control statement.
The options available on the MERGE statement can be specified in other sources as well. A table showing all possible sources for these options and the order of override are given in Specification/override of DFSORT options. When an option can be specified on either the MERGE or OPTION statement, it is preferable to specify it on the OPTION statement.
DFSORT accepts but does not process the following MERGE operands: WORK=value and ORDER=value.
- DFSORT produces merged records for output according to the collating rules defined in the active locale. This provides merging for single- or multi-byte character data, based on defined collating rules that retain the cultural and local characteristics of a language.
If locale processing is to be used, the active locale will only be used to process character (CH) control fields.
For more information on locale processing, see Cultural environment considerations or LOCALE in OPTION control statement.
- DFSORT produces merged records for output according to the collating version rules defined in the active collation version. This provides sorting for single-or multi-byte character data based on defined collating version rules that retain the cultural and local characteristics of a language.
See Unicode Environment Considerations or COLLKEY in OPTION control statement.
- FIELDS
- FIELDS=COPY
See the discussion of the COPY option on the OPTION statement, in OPTION control statement.
- FORMAT=f
- EQUALS or NOEQUALS
See the discussion of these options on the OPTION statement, in OPTION control statement.
- FILES=n
Specifies the number of input files for a merge when input is supplied through the E32 exit.
Default: None; must be specified when an E32 exit is used.
Applicable Functions: See Specification/override of DFSORT options.
- FILSZ or SIZE
See the discussion of these options on the OPTION statement, in OPTION control statement.
- SKIPREC
- See the discussion of this option on the OPTION statement, in OPTION control statement.Note: SKIPREC is used for a copy or sort application, but is not used for a merge application.
- STOPAFT
- See the discussion of this option on the OPTION statement, in OPTION control statement.Note: STOPAFT is used for a copy or sort application, but is not used for a merge application.
- Y2PAST
See the discussion of this option on the OPTION statement, in OPTION control statement.
Note: CENTURY=value and CENTWIN=value can be used instead of Y2PAST=value.