JCL statements
The BBSAMP member DPRREPT provides sample JCL to produce predefined reports in a single-step procedure.
The following table describes the job control language (JCL) statements that are used in the DPRREPT member.
JCL Statement | Description |
---|---|
REPORT | Specifies the name of the Performance Reporter batch program as PGM=JXREPT and the region required to run the program |
STEPLIB DD | Defines the program library containing the JXREPT module |
JXRPPRT DD | Defines the diagnostic messages and counts from reporting |
JXRPREP DD | Defines the requested reports |
SYSUDUMP DD | Defines the dump data set for problem determination |
JXRPSQL DD | Defines the BBPARM library containing the report definitions |
JXRPUT1 DD | Defines the utility work data set for reporting |
JXRPIN DD | Defines the input control statements The syntax for this command is detailed in see the following table. |
The following table describes the syntax of the JXPRIN DD command:
Syntax | Description | ||
---|---|---|---|
SSID= | Identifies the name of the DB2 system that contains the tables from which the reports are to be generated The reporting program establishes a CAF connection. Reports may be generated from multiple DB2 systems by re-specifying this value. | ||
PLAN= | identifies the plan name for reporting (default is JXREPT) | ||
&DATE= | Defines the date range for reported data, which can include any valid SQL WHERE restrictions in addition to the required DATE operand This value replaces the default DATE SQL statement in all following BBPARM members (until another &DATE or &WHERE statement is found). All characters after the equal sign (=) through the last non-blank character on a line are substituted. If the substitution value is longer than one line, put any non-blank character in column 72 and continue the substitution value in column 1 of the next line. &DATE supports either direct substitution from the input statement using DB2’s CURRENT DATE special register or substituted calculated relative dates. Relative dates are requested with the use of * for today's date or *_Nx-M for a range of dates relative to the current time period. | x | x can be D for Day (default), W for Week, or M for Month |
_N | _N represents the number of time periods, prior to the current one, to be selected as the from value | ||
-M | -M is optional and it represents the up to value in the time periods as defined by x. The selected data will not include the data relative to the current period of time. If -M is not used, the up to value is set to the current time period. | ||
&WHERE= | Defines any valid SQL WHERE clause for reported data, but has special processing for DATE and CURRENT DATE values to provide an explicit date The advantage over &DATE is that DB2 can access the data through an index when a single date is requested with &WHERE. This process provides much improved performance. This value replaces the default WHERE SQL statement in all following BBPARM members (until another &WHERE or &DATE statement is found). All characters after the &WHERE through the last nonblank character on a line are substituted. If the substitution value is longer than one line, put any nonblank character in column 72 and continue the substitution value in column 1 of the next line. However, DATE and CURRENT DATE must appear on the first line. | ||
&CYCLE=HOURLY|DAILYWEEKLY|MONTHLY|WORKWKLY|WEEKENDS|RESET | Defines an interval for summarizing report data. Report SELECT statements are modified and the GROUP BY clause is used to summarize the data by the interval requested The summarization interval remains in effect for all following BBPARM members until another &CYCLE statement is processed. &CYCLE=RESET results in cancelling a previous &CYCLE statement. Each time a new interval occurs in the report, the new time is displayed either as a new report line or by replacing an existing DATETIME report column. Parameters are mutually exclusive except either WORKWKLY or WEEKENDS may be used with the interval selections. WORKWKLY limits report data table records to those created by DB2 on Monday through Friday and WEEKENDS limits report data to Saturday and Sunday. | ||
DATETIME=YES|NO | Requests DATETIME column be added to the GROUP BY clause of the report SELECT statement. This control statement is intended to be used for reports from accounting summarization data and displays the time of the summarized accounting record as a separate report line. DATETIME=YES activates the function and DATETIME=NO cancels it. | ||
&TABLE= | Identifies the table from which reported data is selected This value replaces the first table name identified in the FROM SQL statement in the BBPARM members. | ||
&TABLE2= | Identifies the table from which reported data is selected This value replaces the second table name identified in the FROM SQL statement in the BBPARM members. | ||
mbrnames | Keyword indicating the JXRPSQL member name that defines the report to be executed You can specify multiple member names on different lines. These members reside in the data set defined by JXRPSQL. | ||
* (asterisk) | When this character is in column one, it specifies a comment |
Related topic