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


Example 1

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

SUBSET FROM(IN1) TO(OUT1) REMOVE INPUT HEADER TRAILER

This example shows how you can remove the header record (first record) and trailer record (last record).

The variable-length input records look like this:
Len|Data
 33|01A   RODENTS           FFFFF
 23|01A   VOLE    BINKY
 26|02B   HAMSTER GARFIELD
 22|03A   RAT     JUNE
 24|04B   MOUSE   MICKEY
 21|01A   COUNT   004       

We just want to keep the data records. We use REMOVE, INPUT, HEADER and TRAILER to indicate we want to remove the header and trailer input records.

The output records would look like this:
 23|01A   VOLE    BINKY                                                
 26|02B   HAMSTER GARFIELD                                             
 22|03A   RAT     JUNE                                                 
 24|04B   MOUSE   MICKEY   

Note that we could use FIRST and LAST instead of HEADER and TRAILER.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014