The input data set defined by CADASD is the same data set you created earlier (with the SORT operator) for the California branches. HIGHER(-1500) indicates that you want to count values in the profit field that are greater than -1500, while LOWER(+8000) indicates that you want to count values in the profit field that are less than +8000. For a negative limit, you must specify a minus (-) sign before the number. For a positive limit, you either specify a plus (+) sign before the number or leave it out, therefore, HIGHER(8000) is the same as HIGHER(+8000).
To print a count of the number of branches (in California and Colorado) with less than 32 employees, write the following RANGE statement:
Because CADASD and ALL were previously defined, you don't need to add any new JCL statements to the ICETOOL job.
When these RANGE operators are run, the results are placed in the TOOLMSG data set. The TOOLMSG output produced for these RANGE operators would look like this:
* California branches profit analysis
RANGE FROM(CADASD) ON(28,6,PD) HIGHER(-1500) LOWER(+8000)
ICE627I 0 DFSORT CALL 0004 FOR COPY FROM CADASD TO E35 EXIT COMPLETED
ICE628I 0 RECORD COUNT: 000000000000007
ICE631I 0 NUMBER OF VALUES IN RANGE FOR (28,6,PD) : 000000000000003
ICE602I 0 OPERATION RETURN CODE: 00
* Branches with less than 32 employees
RANGE FROM(ALL) ON(18,4,ZD) LOWER(32)
ICE627I 0 DFSORT CALL 0005 FOR COPY FROM ALL TO E35 EXIT COMPLETED
ICE628I 0 RECORD COUNT: 000000000000012
ICE631I 0 NUMBER OF VALUES IN RANGE FOR (18,4,ZD) : 000000000000008
ICE602I 0 OPERATION RETURN CODE: 00
So far |
---|
You have now learned how to count the number of values in a range for a particular field using ICETOOL's RANGE operator. Next, you will learn about ICETOOL's DISPLAY operator. |