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


Example 29

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

  OPTION COPY                                              
  OUTFIL FNAMES=OUT1,INCLUDE=(11,3,CH,EQ,C'D51'),ACCEPT=3  
  OUTFIL FNAMES=OUT2,STARTREC=2,ACCEPT=5          

This example illustrates how you can stop processing OUTFIL input records for various groups in different ways.

The input data set has these records:
HEADER  2010/06/30  
FRANK     D51       
ED        D52       
VICKY     D51       
MARTIN    D52      
LILY      D50      
MARC      D51      
JUNE      D51      
LUCY      D51      
TRAILER     8                                                         
The first OUTFIL statement uses INCLUDE to extract the D51 records and ACCEPT=3 to only write the first three D51 records to OUT1. Thus, OUT1 will have these records:
FRANK     D51   
VICKY     D51  
MARC      D51
The second OUTFIL statement uses STARTREC=2 to skip the HEADER record and ACCEPT=5 to only write the next five records to OUT2. Thus, OUT2 will have these records:
FRANK     D51     
ED        D52    
VICKY     D51    
MARTIN    D52    
LILY      D50                                                          

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014