SCC-DLimit reporting In addition to the ISPF
interface and the SCC-DLimit TSO commands such as
DLLIST and DLSYS, functions such as
SCAN, which can be run under
DLMAINT, SCC-DLimit can produce
customized reports using the reporting facilities of the SCC
Monitor. Producing customized reports on the contents of the
SCC-DLimit database is a two-step process:
-
Execute the
BACKUPfunction of DLMAINT to extract the desired accounting records from the SCC-DLimit database. Use theINCLUDEandEXCLUDEstatements to specify particular sets of accounts. Specify alternate SCC-DLimit databases via theSET DATABASEstatement if needed. -
Execute program MONRUN to produce the desired report.
MONRUNaccepts two inputs:- The
SYSINstream contains the control statements for the report (report title, column headings, sort order, etc.). - The
RULEdata set specifies a set of SCC-DLimit rules used to filter the extracted information and to select which fields are included in the report.
- The
By extracting the desired records, specifying which fields are to be included via the RULE data set, and specifying the format via SYSIN, almost any type of report can be created. Control breaks and summarization may be specified in SYSIN, and records for individual SCC-DLimit accounts may be included or excluded as desired. The RULE data set can also define new variables (for example, current percentage of maximum space limit) to be dynamically calculated and included in the report.
The DLimit reporting jobs use SCC Monitor (MONRUN) to create reports.
JCL Statements
The following examples show the required JCL statements for SCC-DLimit reporting.
The first step invokes DLMAINT to select the desired records from the SCC-DLimit database. The second step produces the report.
-- Step 1: Extract records with DLMAINT
//BACKDB EXEC PGM=DLMAINT,REGION=4M
//STEPLIB DD DISP=SHR,DSN=DTS.R71.LOADLIB
//EXTRACT DD DSN=&&EXTRACT,DISP=(,PASS),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
INCLUDE ACCOUNT(*)
BACKUP TODD(EXTRACT)
*
Figure 8-1. Sample report JCL - step 1 - data extraction
-- Step 2: Run MONRUN to generate the report
//REPORT EXEC PGM=MONRUN,REGION=4M
//STEPLIB DD DISP=SHR,DSN=DTS.R71.LOADLIB
//EXTRACT DD DSN=*.DLMAINT.EXTRACT,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSUT1 DD SPACE=(CYL,(2,1)),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=250,DSORG=PS)
//SYSUT2 DD SPACE=(CYL,(2,1)),UNIT=SYSDA
//SYSUT3 DD SPACE=(CYL,(2,1)),UNIT=SYSDA
//SYSIN DD * control statement
//RULE DD * rule statements
*
|
Statement |
Use |
|---|---|
|
|
Job statement for the DLimit report job. |
|
|
Specifies the program name for the DLimit reporting program
(for example, |
|
|
This is required if Note: All libraries allocated to
STEPLIB
must be authorized. |
|
|
Specifies the output data set for messages from
|
|
|
Specifies the data set holding the records extracted from
the SCC‑DLimit database. This is a sequential data set; DCB
characteristics are determined by |
|
|
Report output data set. A sequential data set with
|
|
|
Contains control statements used to generate the report.
Typically a sequential data set with
|
|
|
Contains SCC‑DLimit rules used to select and reformat
records from the extract file for the report writer. May be
a PDS member or a sequential data set; the DD name is
specified on the |
|
|
Messages data set required by the system sort. |
|
|
Messages data set required by the system sort. |
|
|
Intermediate work data set used by
|
|
|
Intermediate work data set used by
|
|
|
Intermediate work data set used by
|
DLimit reporting control statements
The following control statements may be specified in the SYSIN stream of the EXEC PGM=MONRUNstep. These control statements specify the location of the RULE data set, the format of the report output, sort and control break summarization fields, column headings, and other information that is needed to produce the report output.
- DSL(DDNAME(ddname))
- Specifies the DD name of the data set containing SCC-DLimit
database records which are input to reporting. These records are
created by extracting information on desired accounts via the
BACKUPfunction of DLMAINT. - RULES(NAME(RULE) PARMLIB() LIST))
- Specifies the DD name of the
RULEdata set. TheRULEdata set contains SCC-DLimit rules that specify which fields are needed in the report. Further filtering may be performed byIFstatements in theRULEdata set, and new fields may be defined by the rules. If theRULEdata set is a sequential data set or included instream, thePARMLIBoperand may be empty. If theRULEdata set is a member of a PDS, thePARMLIBoperand must specify the DDname of the PDS while theRULEoperand specifies the member name. TheLISToperand is optional and causes the contents of theRULEdata set to be displayed onSYSPRINT.
- SORT(field_name, A | D, field_name, A | D, ...)
- Specifies fields on which report detail records are sorted.
Fields must have been included in the
DEFRECstatement in theRULEdata set. UseAfor ascending orDfor descending order.- FORMAT ( DATE( abcd )
- FIELD( field_names )
- INCLUDE(ENV(DSL_ACCOUNT))
-
This statement (FORMAT/DEFREC etc.) is required to inform SCC Monitor that SCC-DLimit records are being processed. The SCC-DLimit rules are examined and a record is written (when a
WRITERECis encountered) for each SCC-DLimit account processed.
- Reports using SYNCSORT / SYNCTOOL
-
If your installation does not run DFSORT and the ICETOOL utility is not available, the
SELECT,SORTorFORMATstatements will fail on the #LINK request to ICETOOL. For installations running SYNCSORT, the product provides a similar utility (SYNCTOOL) that can be used for report generation. To use SYNCTOOL, issue the following DIF command to force the #LINK request to use SYNCTOOL instead of ICETOOL:F DIF,MODULE ICETOOL SYNCTOOLAfter issuing this command, run the report again. SYNCTOOL control cards have slight differences, so you may receive additional errors. If errors occur, examine sort messages. Date and time formats can be changed on the
FORMATstatement to accommodate differences. For example, SYNCTOOL utility in release 3.6 does not supportDATE(MD4/). UseDATE(MDY/)on theFORMATcommand.Note: To make the DIFMODULEcommand persist across DIF restarts, add the following card to the start of theSTART00member inDTS.R71.PARMLIB:MODULE ICETOOL SYNCTOOL
- The RULE data set
-
The
RULEdata set contains a series of statements used for processing the extracted SCC-DLimit records. The rules are examined for each SCC-DLimit account; aWRITERECstatement creates a new record that will be input to the report writer. TheFORMATstatement inSYSINrefers to the fields included in this record when formatting report output.A sample rule set is shown below. This sample creates a record containing account name, current space used, current percentage of maximum space allowed, etc. Use
DEFRECto specify fields included in the record andDEFEQUto specify calculated fields.DEFEQU &CURR_PCT = &USRFLDN1 /* CALCULATED FIELD */ /* DEFRULE SELRULE CONTINUE(NEXTIF) */ IF &ACCT_NAME = * THEN SET &CURR_PCT = 0 /*******************************************************/ /* CALCULATE THE PERCENT UTILIZATION FOR THE ACCOUNT */ /*******************************************************/ IF &ACCT_MAX-T NE 0 THEN SET &CURR_PCT = 'EVAL(&ACCT_CUR-T * 100 / ACCT_MAX-T)' ELSE SET &CURR_PCT = 0 /******************************************************/ /* SELECT THE RECORDS TO BE INCLUDED IN THE REPORT */ /******************************************************/ IF &CURR_PCT GT 100 OR &CURR_PCT GT &ACCT_WARN THEN ISSUE WRITEREC(RPTREC) /*******************************************************/ /* IDENTIFY THE SCC-DLIMIT DATABASE RECORD FIELDS */ /* AND THE FIELDS THAT MAY BE USED IN THE REPORT */ /* AND SPECIFY ALTERNATE COLUMN HEADINGS */ /*******************************************************/ DEFREC RPTREC INIT(BLANKS) LEN(300) FIELD &ACCT_NAME HEADER('ACCOUNT') FIELD &ACCT_CREDATE FIELD &ACCT_CRETIME FIELD &ACCT_USEDATE FIELD &ACCT_USETIME FIELD &ACCT_WARN HEADER('WARN PCT') FIELD &ACCT_MODE FIELD &ACCT_MAX HEADER('MAX SPACE') FIELD &ACCT_HWM HEADER('HWM SPACE') FIELD &ACCT_HWMDATE FIELD &ACCT_HWMTIME FIELD &ACCT_CUR HEADER('CUR SPACE') FIELD &CURR_PCT HEADER('CUR PCT')Figure 8-3. Sample SCC-DLimit Reporting Rules
The
DEFEQUstatement defines a new numeric variableCURR_PCTwhich contains current percentage utilization for the account. This variable is not in the original SCC-DLimit records and is calculated for each account by the firstIFstatement. TheCONTINUE(NEXTIF)parameter on theDEFRULEstatement indicates processing continues even when a true condition is encountered (the default SCC rule processing exits on the first true condition).If the last
IFstatement evaluates true, a record for reporting is written. The content is defined by theDEFRECstatement that follows.The
DEFRECstatement specifies fields included in the record used byFORMAT. In this example, account name and current space amount are included, plus the calculated current percentage field. Field names are taken from the Symbolic Fields chapter.The
SYSINstatements necessary to generate a sample report using the above rules, along with sample output, are shown below:DSL(DDNAME(EXTRACT)) RULES(NAME(RULE) PARMLIB() LIST) INCLUDE(ENV(DSL_ACCOUNT)) SORT(ACCT_CUR,D,ACCT_NAME,A) FORMAT(FIELD(ACCT_NAME, ACCT_CUR, CURR_PCT, ACCT_MAX, ACCT_HWM) TITLE('SCC-DLIMIT ACCOUNTS OVER WARNING PERCENT REPORT'))Sample report header and column headings:
SCC-DLIMIT ACCOUNTS OVER WARNING PERCENT REPORT 07/18/01 06:05:05 - 1 - ACCOUNT CUR SPACE CUR PCT MAX SPACE HWM SPACE ------------ --------- ------- --------- --------- PAYROLL:VSAM 24.988M 82 30.486M 26.201M PAYROLL:NONVSAM 157.839M 95 166.147M 162.998M PAYROLL:TOTAL 182.827M 100 180.000M 185.443M GENL_LEDGR:TOTAL 472.892M 98 482.543M 472.892M
Sample reports
Several sample reports are included in the SCC-DLimit Sample Library. These reports provide examples of how to use the SCC-DLimit reporting facilities to produce detail and summary reports that give a clearer picture of DASD space use across the installation.
- Account detail report
- This is member
DSLRPT1in the Sample Library. For selected accounts, show the current total space assigned to the account, maximum space limit, and other account information.
- Accounts over limit report
- This is member
DSLRPT2in the Sample Library. Display all SCC-DLimit accounts which have exceeded either their specified limit (MAX) or their warning levels.
- High-watermark report
-
This is member
DSLRPT3in the Sample Library. For selected accounts, show the highest amount of space ever assigned to the account (the high-water mark) and the date on which it occurred.