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


Example 10

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

//S1 EXEC  PGM=SORT                           
//SYSOUT    DD  SYSOUT=*                      
//SARA DD *                                   
AAA FROM SARA                                 
CCC FROM SARA                                 
DDD FROM SARA                                 
//MOLLY DD *                                  
AAA FROM MOLLY                                
BBB FROM MOLLY                                
DDD FROM MOLLY                                
//NORA DD *                                   
AAA FROM NORA                                 
BBB FROM NORA                                 
CCC FROM NORA                                 
//SORTOUT DD SYSOUT=*                         
//DFSPARM  DD    *                            
 OPTION EQUALS,MERGEIN=(NORA,SARA,MOLLY)      
 MERGE FIELDS=(1,3,CH,A)                      
/*   
This example illustrates the use of the alternate ddnames NORA, SARA and MOLLY for a MERGE application instead of SORTINnn ddnames. Since EQUALS is specified, equally collating records will be from NORA, then SARA, then MOLLY, that is, in the order specified in the MERGEIN list. Thus, SORTOUT contains these records:
AAA FROM NORA
AAA FROM SARA
AAA FROM MOLLY
BBB FROM NORA
BBB FROM MOLLY
CCC FROM NORA
CCC FROM SARA
DDD FROM SARA
DDD FROM MOLLY
If MERGEIN=(SARA,MOLLY,NORA) was specified in the MERGEIN list in DFSPARM, SORTOUT would contain these records:
AAA FROM SARA
AAA FROM MOLLY
AAA FROM NORA
BBB FROM MOLLY
BBB FROM NORA
CCC FROM SARA
CCC FROM NORA
DDD FROM SARA
DDD FROM MOLLY

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014