Example 12
SORT FROM(RAWSMF) TO(SMF14) USING(SMFI)
DISPLAY FROM(SMF14) LIST(SMF14RPT) -
TITLE('SMF Type-14 Records') DATE(4MD/) -
HEADER('Date') ON(11,4,DT1,E'9999/99/99') -
HEADER('Time') ON(7,4,TM1,E'99:99:99') -
HEADER('Sys') ON(15,4,CH) -
HEADER('Jobname') ON(19,8,CH) -
HEADER('Datasetname') ON(69,44,CH)
This example shows how SMF date and time values can be displayed in a meaningful way in a report on SMF type-14 records.
The SORT operator selects the type-14 records from the RAWSMF data
set and sorts them by date and time to the SMF14 data set. It uses
the following control statements in SMFICNTL:
INCLUDE COND=(6,1,BI,EQ,14)
SORT FIELDS=(11,4,PD,A,7,4,BI,A)
The DISPLAY operator uses the selected type-14 records in SMF14
to print, in the SMF14RPT data set:
- A title line containing the specified title and the date
- A heading line containing the specified underlined headings
- Data lines containing:
- The SMF date values in positions 11-14 displayed as C'yyyy/mm/dd'
- The SMF time values in positions 7-10 displayed as C'hh:mm:ss'
- The character values in positions 15-18
- The character values in positions 19-26
- The character values in positions 69-112
The SMF14RPT output starts on a new page and looks as follows:
SMF Type-14 Records 2001/04/24
Date Time Sys Jobname Datasetname
---------- -------- ---- -------- ----------- ...
2001/04/20 06:03:15 ID03 JOB00003 SYS1.QRS
2001/04/20 10:03:22 ID02 JOB00002 SYS1.XYZ
2001/04/21 14:05:37 ID03 JOB00004 SYS1.MNO
2001/04/21 22:11:00 ID03 JOB00005 SYS1.MNO
2001/04/24 00:00:08 ID03 JOB00006 SYS1.MNO
Note: When you use SMF date formats (DTn) or SMF time formats
(TMn), the SMF values are treated as numeric. This allows you to use
numeric formatting items such as masks and patterns to edit the SMF
values. By default, DTn and TMn headings, like other numeric headings,
appear right-aligned as shown in the SMF14RPT output example shown previously in this section. If you want to
center-align or left-align headings for numeric values, you can add
an appropriate number of blanks at the end of HEADER('string1').
For
example, if you wanted to left-align the SMF date heading, you could
use six blanks at the end of the header string like so:
HEADER('Date ')
to
get the following heading: Date
----------
If you wanted to center-align the SMF date heading,
you could use three blanks at the end of the header string like so: HEADER('Date ')
to
get the following heading: Date
----------