You can use symbols wherever decimal constants, character constants,
hexadecimal constants or bit constants can appear in DFSORT control
statements and ICETOOL operators.
The ICETOOL example in
Using symbols for fields in ICETOOL operators uses the
following RANGE operators:
RANGE FROM(OUT) ON(Price) LOWER(+700)
RANGE FROM(OUT) ON(Price) HIGHER(+2000)
and the following
INCLUDE statement:
INCLUDE COND=(Course_Number,EQ,C'00032',OR,
Course_Number,EQ,C'10347')
+700 and +2000 are decimal constants. C'00032' and C'10347' are
character constants. You can use symbols for these constants to make
them more understandable in the ICETOOL operators and DFSORT control
statements you write. The SYMNAMES statements for these constants
look like this:
* Symbols for constants
Discount,+700
Premium,+2000
Beginning_Economics,C'00032'
Advanced_Sociology,C'10347'
To add these symbols for the four constants to the SORT.SYMBOLS
data set, follow these steps:
Table 1. Steps to Define
Symbols for ConstantsStep |
Action |
---|
1 |
Write a comment statement (optional): *
Symbols for constants
|
2 |
Type Discount followed by
a comma. This is the symbol you will use for the decimal constant
+700.
|
3 |
Type the constant followed by a blank. The
constant is +700. You can also use 700, but we recommend
using a + sign for positive decimal constants.
|
4 |
Type Premium followed by a
comma. This is the symbol you will use for the decimal constant +2000.
|
5 |
Type the constant followed by a blank. The
constant is +2000. You can also use 2000, but we recommend
using a + sign for positive decimal constants.
|
6 |
Type Beginning_Economics followed
by a comma. This is the symbol you will use for the character constant
C'00032'.
|
7 |
Type the constant followed by a blank. The
constant is C'00032'. You can also use '00032' or c'00032'.
|
8 |
Type Advanced_Sociology followed
by a comma. This is the symbol you will use for the character constant
C'10347'.
|
9 |
Type the constant followed by a blank. The
constant is C'10347'. You can also use '10347' or c'10347'.
|
The RANGE operators can now be written as:
RANGE FROM(OUT) ON(Price) LOWER(Discount)
RANGE FROM(OUT) ON(Price) HIGHER(Premium)
The INCLUDE statement can now be written as:
INCLUDE COND=(Course_Number,EQ,Beginning_Economics,OR,
Course_Number,EQ,Advanced_Sociology)
Summary |
---|
This chapter covered how to define and use symbols for
fields and constants in DFSORT control statements and ICETOOL operators.
For more information on DFSORT symbols, see z/OS DFSORT Application Programming Guide.
This
completes the z/OS DFSORT: Getting Started tutorials.
The appendixes that follow contain important information about the
Sample Data Sets and the order in which DFSORT processes its various
control statements.
|