Previous Topic: OutputNext Topic: RPTDS5 Sample Report (z/OS and OS/390 Only)


Sample Input Program for the RPTDS4 Report

The following is a brief explanation of the program for this report.

NOTE *‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑*
NOTE * THIS EARL PROGRAM IS BASED ON THE CA ACF2 "D" RECORD*
NOTE *‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑*
 
 OPTION PRINTER=132
 OPTION LIST OFF
 
NOTE *‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑*
NOTE * CHANGE LOG:                                            *
NOTE *                                                        *
NOTE * RELEASE: 6.3                                           *
NOTE *                                                        *
NOTE * TA3985D  07/14/98  Z0012                               * TA3985D
NOTE *          INCREASED RECORD LENGTH OF ACFSMFR FILE       * TA3985D
NOTE *          FOR LONGER OMVS SMF RECORDS.                  * TA3985D
NOTE *                                                        *
NOTE * RELEASE: 6.5                                           *
NOTE *                                                        *
NOTE * TA6015G  03/13/02  Z0037                               * TA6015G
NOTE *          REBRANDING CHANGES.                           * TA6015G
NOTE *                                                        *
NOTE * END OF LOG.                                            *
NOTE *                                                        *
NOTE *‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑*
 
NOTE *‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑*
NOTE * TO USE SRAM SORT REMOVE 'NOTE' BELOW              *
NOTE *‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑*
NOTE OPTION SORT=SRAM
 
 
 ACFFLT: FILE ACFSMFR RECORD=23756                            ! TA3985D
 
COPY HDRECORD
COPY DRECORD
 
DEF RC=ACFSMFR 1‑4 B
DEF ONE (6.0) = 1 'NUMBER'
 
GET ACFFLT
GOTO EOJ (RC=‑1)
 
NOTE IF THERE IS NO OWNER INDICATE NO OWNER SPECIFIED
DECODE OWNER INTO OWNER_WORK (X 24)
 ' ' = 'NO OWNER SPECIFIED'
ELSE OWNER 'RULE' 'OWNER'
 
REPORT 'DATASET VIOLATIONS BY RULE OWNER'
 
 SELECT RECTYPE  'D' AND DRTYPE 'DATASET' AND DSTYPE NOT 'TRACE REQ'
 CONTROL (OWNER_WORK) SKIP BREAK
 (RULEKEY) (LOGONID) (DSTYPE) (DSNAME) ONE
 PRINT TOTALS ONLY OWNER_WORK RULEKEY LOGONID DSTYPE DSNAME (ONE)
END
Highlights

The following letters correspond directly to the letters and braces on the previous page. Each brace highlights a significant part of the customized CA Earl report.

A OPTION

Sorted with the user sort program. To sort the information with the CA‑SRAM method, remove the word NOTE from the line containing the statement OPTION SORT=SRAM. To sort by another method, use this option to specify that method.

Note: If you are a VM site, SRAM SORT is the default.

B INPUT FILE

Specifies which file is used as input. You must include this statement exactly as it is shown in the sample.

C FIELD DEFS

COPY statements here imbed macro library file definitions into the source program. Further values are also defined in the source program. The HDRECORD file contains field definitions common to all CA Earl reports. The DRECORD file contains field definitions explicit to the type D reports.

This section also defines a numeric data item called ONE with a value of 1. This item is used as a counter in the CONTROL statement to produce subtotals.

D READ FILE

Reads the input file records.

E PROCESS LOGIC

Specifies that if no owner is found, substitute the term NO OWNER SPECIFIED. If, however, an owner is found for the record, print the name of the owner.

F SETUP

Selects only data set violations that are not due to trace requests.

G PRINT LOGIC

Sorts the records first according to the value of the OWNER_WORK field, then in the OWNER_WORK groups, according to the value of RULEKEY. Each group of similar RULEKEY records is sorted by DSTYPE, then similar DSTYPE records are sorted by DSNAME. The item ONE accumulates subtotals for each of these groupings. A subtotal prints each time the value of OWNER_WORK, RULEKEY, DSTYPE, or DSNAME changes.

One line prints for each change of data set name (DSN). This line contains the name, type of violation, data set name, and a subtotal for each user. The total of all violations reported prints at the end of the report.