z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


MERGE control statement

z/OS DFSORT Application Programming Guide
SC23-6878-00

Read syntax diagramSkip visual syntax diagram
                        .-,-------.                             
                        V         |                             
>>-MERGE--FIELDS=--+-(----p,m,f,s-+--)----------------------+--->
                   |    .-,---------------.                 |   
                   |    V                 |                 |   
                   +-(----p,m,--+----+--s-+--)--,--FORMAT=f-+   
                   |            '-f,-'                      |   
                   '-COPY-----------------------------------'   

>--+--------------------------+--------------------------------><
   |   .-,------------------. |   
   |   V                    | |   
   '-,---+-+-EQUALS---+---+-+-'   
         | '-NOEQUALS-'   |       
         +-FILES=n--------+       
         +-+-FILSZ=x-+----+       
         | '-SIZE=y--'    |       
         +-SKIPREC=z------+       
         +-STOPAFT=n------+       
         '-Y2PAST=--+-s-+-'       
                    '-f-'         

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's collating behavior can be modified according to your cultural environment. The cultural environment is established by selecting the active locale. The active locale's collating rules affect MERGE processing as follows:
  • 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.

Note: For a merge application, records deleted during an E35 exit routine are not sequence checked. If you use an E35 exit routine without an output data set, sequence checking is not performed at the time the records are passed to the E35 user exit; therefore, you must ensure that input records are in correct sequence.
FIELDS
Read syntax diagramSkip visual syntax diagram
               .-,-------.      
               V         |      
>>-FIELDS=--(----p,m,f,s-+--)----------------------------------><

Is written exactly the same way for a merge as it is for a sort. The meanings of p, m, f, and s are described in the discussion of the SORT statement. The defaults for this and the following parameters are also given there. See SORT control statement.

FIELDS=COPY
Read syntax diagramSkip visual syntax diagram
>>-FIELDS=COPY-------------------------------------------------><

See the discussion of the COPY option on the OPTION statement, in OPTION control statement.

FORMAT=f
Read syntax diagramSkip visual syntax diagram
>>-FORMAT=f----------------------------------------------------><

See the discussion of the FORMAT option in SORT control statement. Used the same way for a merge as for a sort.

EQUALS or NOEQUALS
Read syntax diagramSkip visual syntax diagram
>>-+-EQUALS---+------------------------------------------------><
   '-NOEQUALS-'   

See the discussion of these options on the OPTION statement, in OPTION control statement.

FILES=n
Read syntax diagramSkip visual syntax diagram
>>-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
Read syntax diagramSkip visual syntax diagram
>>-+-FILSZ=x-+-------------------------------------------------><
   '-SIZE=y--'   

See the discussion of these options on the OPTION statement, in OPTION control statement.

SKIPREC
Read syntax diagramSkip visual syntax diagram
>>-SKIPREC=z---------------------------------------------------><

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
Read syntax diagramSkip visual syntax diagram
>>-STOPAFT=n---------------------------------------------------><

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
Read syntax diagramSkip visual syntax diagram
>>-Y2PAST=--+-s-+----------------------------------------------><
            '-f-'   

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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014