Processing SMF Records Using FOCUS

Because FOCUS Master Files are provided for the SMF VSAM and dump files, it is a simple matter to create FOCUS TABLE requests to generate any report of usage accounting that you might require. To do this, you must make the Master Files available by either:

Next, the SMF VSAM file or the SMF dump file must be allocated via DYNAM.

Once this is done, a TABLE request can be run with either SMFVSAM or SMFFIX. If using SMFFIX, ensure that MAXLRECL is set to 32767.

For example:

SET MSG = ON
SET MAXLRECL = 32767
DYNAM ALLOC FILE MASTER DSNAME prefix.MSO.DATA SHR
DYNAM ALLOC FILE SMFVSAM DSNAME SYS1.SMFDUMP.DATA SHR
-RUN
DEFINE FILE SMFVSAM
CPU/D8.2 = SMFOFCPU / 100 ;
TIME/D9.2 = SMFOFLTM / 360000 ;
HR/I2 = SMFOFTME / 360000 ;
MIN/I2 = (SMFOFTME - (HR*360000)) / 6000 ;
TOD/A5 = EDIT(HR) | ':' | EDIT(MIN) ;
END
TABLE FILE SMFVSAM
HEADING CENTER
"MSO USAGE ACCOUNTING REPORT"
"ALL REGIONS "
" "
SUM CPU SMFOFEXC AS 'EXCP,CNT' TIME AS 'HRS'
BY SMFOFUID AS 'USER,ID'
BY SMFOFDTE AS 'DATE'
BY TOD AS 'TIME'
ON SMFOFUID SUB-TOTAL
IF SMFOFRTY EQ -2
END
-RUN

Note: SMFOFRTY (the SMF number) is -2 in our example, and indicates SMF type 254. This is because FOCUS treats the I1 field in the Master Files signed. Thus, user-defined SMF numbers (128 to 255) are represented as -128 to -1 in reports.


Information Builders