Q1. Running the report in EXPLORE with the field RESRC given 20 characters, how to code the control cards to display this field correctly?
Q2. Is there an easy way to break the two fields into Workload and SVCclass and Period and Importance?
Q3. Is there an option to format the date?
A1. Run the report with the below input:
SELECT OLDSTS(¬NONE)
SELECT VARNAME(WLMPI)
SELECT STATUS(¬NORMAL)
TAB DATE STARTTIME SORT ALPHA,
COMMON THRESHOLD EXCEPTION VARNAME AND,
COMMON THRESHOLD EXCEPTION RESRC AND,
COMMON THRESHOLD EXCEPTION RESRC2L FORMAT(20C) AND,
COMMON THRESHOLD EXCEPTION VALUE AND,
COMMON THRESHOLD EXCEPTION OLDVALUE AND,
COMMON THRESHOLD EXCEPTION STATUS AND,
COMMON THRESHOLD EXCEPTION OLDSTATUS AND,
COMMON THRESHOLD EXCEPTION COUNT AND,
COMMON THRESHOLD EXCEPTION ELAPSED
END
RUN
A2. The field names are documented in SYSVIEW documentation, in the Report Writer section, there is a page for COMMON THRESHOLD EXCEPTIONS variables.
What's happening is RESRC is defined as 8 bytes, so that's where it's cutting off. If the field is something like "ABCDE.FGHIJ",
it would get cut off like "ABCDE.FG HIJ".
Here is a better solution:
Report Writer doesn't break up the string based on its contents, the below input should work perfectly:
SELECT OLDSTS(¬NONE)
SELECT VARNAME(WLMPI)
SELECT STATUS(¬NORMAL)
DEFINE XVAR COMMON THRESHOLD EXCEPTION XRESRC,
PRODUCT=EXPC,
RECORD=03,
TRIPLET=128,
OFFSET=8,
LENGTH=28,
TYPE=CHARACTER,
HDR1=RESOURCE
TAB DATE STARTTIME SORT ALPHA,
COMMON THRESHOLD EXCEPTION VARNAME AND,
COMMON THRESHOLD EXCEPTION XRESRC AND,
COMMON THRESHOLD EXCEPTION VALUE AND,
COMMON THRESHOLD EXCEPTION OLDVALUE AND,
COMMON THRESHOLD EXCEPTION STATUS AND,
COMMON THRESHOLD EXCEPTION OLDSTATUS AND,
COMMON THRESHOLD EXCEPTION COUNT AND,
COMMON THRESHOLD EXCEPTION ELAPSED
END
RUN
Here is defined a new variable called XRESRC and pointed it to the offset in the SMF record. This will fill in the resource in one column.
The line can be ajusted to "LENGTH=28," to set the column width.
A3. There is not an explicit "CSV format" option, but there are a few options that are helpful. They are specified in the input record (example below).
There is an option to place the date on every row. This is coded as OPTION(PRINT=DATETIME).
By default, Report Writer blanks out '0' values for easier viewing, but if these 0s need to be printed out for CSV. The option for this is OPTION(ZEROFLD=ZERO)
As an example of how this OPTION line fits in, see the below report:
//SYSIN DD *
OPTION(PRINT=DATETIME,ZEROFLD=ZERO)
SELECT OLDSTS(¬NONE)
SELECT VARNAME(WLMPI)
SELECT STATUS(¬NORMAL)
DEFINE XVAR COMMON THRESHOLD EXCEPTION XRESRC,
PRODUCT=EXPC,
RECORD=03,
TRIPLET=128,
OFFSET=8,
LENGTH=28,
TYPE=CHARACTER,
HDR1=RESOURCE
TAB DATE STARTTIME SORT ALPHA,
COMMON THRESHOLD EXCEPTION VARNAME AND,
COMMON THRESHOLD EXCEPTION XRESRC AND,
COMMON THRESHOLD EXCEPTION VALUE AND,
COMMON THRESHOLD EXCEPTION OLDVALUE AND,
COMMON THRESHOLD EXCEPTION STATUS AND,
COMMON THRESHOLD EXCEPTION OLDSTATUS AND,
COMMON THRESHOLD EXCEPTION COUNT AND,
COMMON THRESHOLD EXCEPTION ELAPSED
END
RUN
/*
In the Report Writer section, there is a page for COMMON THRESHOLD EXCEPTIONS variables: