Download How to Make an SMF Report.fm

Transcript
Lesson 4.
How to Make Your Own Report Titles
Built-In Fields Available
Here is a table showing the built-in fields available for use in TITLE statements:
Built-In
Field
Description
#DATE
the system date in a true date field (which you can format any
way you like. By default it is formatted as MM/DD/YY.)
#DAYNAME
a character field containing the current day of the week (e.g.,
"MONDAY ")
#TIME
the system time formatted as a 8-byte, 12-hour HH:MM
character field
#TIME24
the system time formatted as a 5-byte, 24-hour HH:MM character
field
#HHMMSS
the system time in a true time field (which you can format any
way you like.)
#JOBNAME
the name of the job executing Spectrum SMF Writer
#PAGENUM
the current page number of the report
AM/PM
Putting SMF File Data in the Title
As mentioned earlier, TITLE statements consist of any mix of literal texts and field names.
A field name can be one of Spectrum SMF Writer’s built-in fields, as in the earlier
example. Or it can be the name of a regular field from the SMF file (or even a COMPUTE
field). When inserting the contents of a data field into the title, Spectrum SMF Writer uses
the data found in the first record used on that report page. Figure 15 (page 55) shows an
example of including file data in a title.
How to Align the Title
Consider this TITLE statement again:
TITLE: #DATE / 'SPECTRUM SMF WRITER REPORT - CPU TIMES' / 'PAGE' #PAGENUM
Notice that it contains two slashes (/). These are a powerful formatting device that let you
easily align your titles in the customary way without having to carefully count up the
number of columns in your report lines. (And then carefully counting them again when you
make a minor change to the report.)
When slashes are not used, the whole title is centered over the report.
But when slashes are used, they divide the title line into three parts. The first part of the
title (#DATE, in the example above) will be aligned with the left margin of the report. The
middle part (the literal text) will be centered over the report. And the last part ("PAGE" and
#PAGENUM) will be aligned with the right margin of the report.
Figure 5 (page 27) shows a report that uses a TITLE statement similar to the one above.
Note: You can also use a single slash in your TITLE statement. That results in a 2part title, where the first part is left-justified and the second part is right-justified.
Spectrum SMF Writer Tutorial
23