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


MERGE operator

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

Read syntax diagramSkip visual syntax diagram
          .-,------------------------.                
          |            .-,----.      |                
          V            V      |      |                
>>-MERGE------FROM--(----indd-+--)---+--USING(xxxx)------------->

>--+---------------------+--+-------------+--------------------->
   |        .-,-----.    |  '-VSAMTYPE(x)-'   
   |        V       |    |                    
   '-TO--(----outdd-+--)-'                    

>--+-----------------+--+--------+-----------------------------><
   +-LOCALE(name)----+  '-SERIAL-'   
   +-LOCALE(CURRENT)-+               
   '-LOCALE(NONE)----'               

Merges up to 50 input data sets to an output data set. The records in each input data set to be merged must already be in sorted order as specified by the control fields in a supplied DFSORT MERGE statement.

You must specify at least one FROM operand and a USING(xxxx) operand. Each FROM operand can be used to specify one or more ddnames. You can specify up to 10 FROM operands. The maximum number of ddnames in all of the FROM operands must not exceed 50.

DFSORT is called to merge the indd data sets to the outdd data sets using the DFSORT control statements in xxxxCNTL. You must supply a DFSORT MERGE statement in the xxxxCNTL data set to indicate the control fields for the merge. You can use additional DFSORT statements in the xxxxCNTL data set to merge a subset of the input records (INCLUDE or OMIT statement; OUTFIL INCLUDE, OMIT, SAVE, STARTREC, ENDREC, SAMPLE, SPLIT, SPLITBY and SPLIT1R operands), reformat records for output (INREC, OUTREC, and OUTFIL statements; user exit routines), and so on.

If EQUALS is in effect, records that collate identically are output in the order of their ddnames in the FROM operands.

The active locale's collating rules affect MERGE processing as explained in MERGE control statement. If an INCLUDE or OMIT statement or an OUTFIL INCLUDE or OMIT operand is specified in the xxxxCNTL data set, the active locale's collating rules affect INCLUDE and OMIT processing as explained in the "Cultural Environment Considerations" discussion in INCLUDE 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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014