Obtaining various statistics
Obtaining
Various StatisticsSample code
|
---|
|
Assume that you specify DD statements with the following ddnames
for the indicated data sets:
- DATA1
- A data set containing the name, salary, department, location and so on, of each of your employees. The name field is in positions 1 through 20 in character format and the salary field is in positions 22 through 28 in packed decimal format.
- SALARIES
- A SYSOUT data set.
You can use the ICETOOL operators in Table 1 to
do the following:
- MODE STOP
- If an error is found while processing one of the operators, subsequent operators are not processed (that is, each operator is dependent on the success of the previous operator).
- VERIFY
- Prints error messages in the TOOLMSG data set identifying any invalid values in the packed decimal salary field.
- DISPLAY
- Prints a report with each employee's name and salary and the average for all employee salaries in the SALARIES list data set.
- STATS
- Prints messages in the TOOLMSG data set showing the minimum, maximum, average, and total of the individual salaries.
- RANGE
- The three RANGE operators print messages in the TOOLMSG data set showing the number of salaries below $20,000, from $20,000 to $39,999, and above $40,000.
- OCCUR
- Prints a report with each unique salary and the number of employees who receive it in the SALARIES list data set.