Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Using symbols for fields in DFSORT statements z/OS DFSORT: Getting Started SC23-6880-00 |
|
Now that you have your symbols for the bookstore data set defined in SORT.SYMBOLS, you can use those symbols in DFSORT control statements wherever fields can appear. Here's an example of a DFSORT application that uses symbols. It
selects the books for courses 00032 and 10347 from SORT.SAMPIN and
sorts them by title, instructor and price:
The SYMNAMES DD statement specifies the SYMNAMES data set to be used for this application. The SYMNOUT DD statement specifies a data set in which you want
DFSORT to list your original SYMNAMES statements and the symbol table
constructed from them. You can omit the SYMNOUT data set if you don't
want to see that information. For this SYMNAMES data set, the SYMNOUT
listing looks like this:
The INCLUDE and SORT statements use symbols for the fields instead of position, length and format. You can define symbols for any %nnn, %nn or
%n parsed fields you use. For example, you could specify these
SYMNAMES statements to define symbols for %01 and %02:
and then use these symbols in the following OUTREC
statement:
|
Copyright IBM Corporation 1990, 2014
|