|
Sample SMF 30 Report -- Count of Tasks by Type of WorkThe 3 sample reports below were created with Spectrum SMF Writer, the low-cost 4GL report writer for SMF files. In this example, we read the SMF file once, and make 3 separate reports during that single pass of the large file. In this example each report selects the same records -- just the type 30 records with a subtype of 5 ("job termination" records.) (But Spectrum SMF Writer allows you to specify different selection criteria for each report, if wanted.) We then compute the elapsed time by subtracting the Job start date/time from the date/time the log record is written (at job termination time). We computed the elapsed time both in seconds, and in hours. For a job run monthly, you would probably want the hours to print in the report. For a days worth of data, you could show seconds. (Or create an elapased minutes field. Or print the elapsed time in HH:MM:SS format. With Spectrum SMF Writer's flexibility, you have lots of options.) In the first report, we simply sort and break on the SMF30WID field from the SMF 30-5 records. SMF30WID contains a 4-byte "Work Type Identifier". By breaking on this field, the report shows us the count of tasks for each category of work (Started Tasks, TSO Sessions, etc.) It also shows the total elapsed time for each category. (Note that the sample report below used a very small test file of SMF records.) The second report is very similar to the first one. But in this case, instead of using the SMF30WID field to categorize tasks, we created our own WOROK-TYPE field. We assigned values to it based on the contents of the Jobname (SMF30JBN) and the SMF30WID fields. Note that Spectrum SMF Writer has a very powerful comparison operator that other languages do not have -- the colon. The colon comparator means "contains." For example, we assign "CICS REGIONS" to WORK-TYPE if the jobname contains the characters CICS somewhere within it. The third report is just like the second report -- but with an OPTION: SUMMARY statement added. That makes it a summary report showing only the total lines. All of the detail lines are suppressed. That is an option you would probably want if you ran this job on a whole month's worth of SMF data! These Spectrum SMF Writer Statements:************************************************** * SPECIFY THE INPUT FILE (AND LAYOUT) FOR THIS RUN ************************************************** INPUT: SMF30 ************************************************** * SPECIFY WHICH SMF RECORDS TO INCLUDE IN REPORT ************************************************** INCLUDEIF: SMF30RTY = 30 AND SMF30STP = 5 ************************************************** * SPECIFY REPORT TITLE ************************************************** TITLE: 'NUMBER OF TASKS, BY WORD TYPE INDICATOR (SMF30WID)' ************************************************** * COMPUTE THE NUMBER OF ELAPSED SECOND BY SUBTRACTING * SMF LOG DATE/TIME FROM JOB START DATE/TIME ************************************************** COMPUTE: ELAPSED-SECS = (#MAKENUM(SMF30DTE) * 86400 + #MAKENUM(SMF30TME)) -(#MAKENUM(SMF30STD) * 86400 + #MAKENUM(SMF30SIT)) COMPUTE: ELAPSED-HRS(4) = ELAPSED-SECS / 3600 ************************************************** * SPECIFY WHICH SMF FIELDS (AND COMPUTED FEILDS) * TO SHOW IN THE REPORT COLUMNS ************************************************* COLUMNS: SMF30WID SMF30JBN SMF30JNM SMF30DTE SMF30TME SMF30STD SMF30SIT ELAPSED-SECS(8) ELAPSED-HRS(7) ************************************************** * SORT AND BREAK ON SMF30WID, WHICH IS * THE 'WORK TYPE INDICATOR' FIELD, TO GET SUBTOTALS ************************************************* SORT: SMF30WID BREAK: SMF30WID SPACE(1) ************************************************** * NOW DEFINE A NEW REPORT TO MAKE FROM THE * SAME PASS OF THE SMF FILE ************************************************* NEWOUTPUT: ************************************************** * SPECIFY WHICH SMF RECS TO INCLUDE IN THIS REPORT ************************************************** INCLUDEIF: SMF30RTY = 30 AND SMF30STP = 5 ************************************************** * BREAK THE TASK DOWN INTO CATEGEORIES THAT ARE * MORE USEFUL FOR THIS SHOP THAN SMF30WID VALUES ************************************************** COMPUTE: WORK-TYPE = WHEN(SMF30JBN : 'CICS') ASSIGN('CICS REGIONS') WHEN(SMF30JBN : 'DB2') ASSIGN('DB2 REGIONS') WHEN(SMF30WID = 'STC') ASSIGN('STARTED TASKS') WHEN(SMF30WID = 'TSO') ASSIGN('TSO SESSIONS') ELSE ASSIGN('BATCH JOBS') TITLE: 'NUMBER OF TASKS, BY TYPE' COLUMNS: WORK-TYPE SMF30JBN SMF30JNM SMF30DTE SMF30TME SMF30STD SMF30SIT ELAPSED-SECS(8) ELAPSED-HRS(7) SORT: WORK-TYPE BREAK: WORK-TYPE SPACE(1) ************************************************** * NOW DEFINE ANOTHER REPORT TO MAKE FROM THE * SAME PASS OF THE SMF FILE ************************************************* NEWOUTPUT: ************************************************** * SUPPRESS DETAIL LINE AND JUST SHOW TOTALS ************************************************** OPTION: SUMMARY ************************************************** * SPECIFY WHICH SMF RECS TO INCLUDE IN THIS REPORT ************************************************** INCLUDEIF: SMF30RTY = 30 AND SMF30STP = 5 TITLE: 'NUMBER OF TASKS, BY TYPE' TITLE: 'SUMMARY REPORT' COLUMNS: WORK-TYPE SMF30JBN SMF30JNM SMF30DTE SMF30TME SMF30STD SMF30SIT ELAPSED-SECS(8) ELAPSED-HRS(7) SORT: WORK-TYPE BREAK: WORK-TYPE SPACE(0)
Produce This SMF Report:NUMBER OF TASKS, BY WORD TYPE INDICATOR (SMF30WID) ELAPSED ELAPSED SMF30WID SMF30JBN SMF30JNM SMF30DTE SMF30TME SMF30STD SMF30SIT SECS HRS ________ ________ ________ ________ ___________ ________ ___________ ________ _______ JES2 GSL10010 JOB02576 07/25/08 06:01:33.76 07/25/08 06:01:31.67 2.09 0.0006 JES2 AMTTRA23 JOB07284 07/25/08 06:02:38.59 07/25/08 05:59:36.87 181.72 0.0505 JES2 AMTPRM23 JOB07286 07/25/08 06:06:49.94 07/25/08 06:05:43.66 66.28 0.0184 JES2 AMTCON23 JOB07287 07/25/08 06:07:21.59 07/25/08 06:07:21.16 0.43 0.0001 JES2 BA1PORT JOB07289 07/25/08 06:09:06.37 07/25/08 06:08:45.17 21.20 0.0059 JES2 O1X20715 JOB07291 07/25/08 06:25:49.35 07/25/08 06:25:06.68 42.67 0.0119 *** TOTAL FOR JES2 ( 6 ITEMS) 314.39 0.0874 OMVS B5A9514 STC07283 07/25/08 06:00:03.48 07/25/08 05:59:58.40 5.08 0.0014 OMVS FTPD4 STC07283 07/25/08 06:11:23.89 07/25/08 06:11:23.54 0.35 0.0001 OMVS B5A9514 STC07283 07/25/08 06:11:26.16 07/25/08 06:11:23.89 2.27 0.0006 *** TOTAL FOR OMVS ( 3 ITEMS) 7.70 0.0021 STC SMFSLRD STC07285 07/25/08 06:00:14.57 07/25/08 06:00:14.46 0.11 0.0000 STC B9AAQ STC07283 07/25/08 06:41:26.16 07/25/08 05:57:39.62 2,626.54 0.7296 *** TOTAL FOR STC ( 2 ITEMS) 2,626.65 0.7296 TSO U016101 TSU07288 07/25/08 06:09:15.99 07/25/08 06:07:54.82 81.17 0.0225 TSO B5A9514 TSU07280 07/25/08 06:09:18.17 07/25/08 05:56:56.36 741.81 0.2061 *** TOTAL FOR TSO ( 2 ITEMS) 822.98 0.2286 ****** GRAND TOTAL ( 13 ITEMS) 3,771.72 1.0477
And This SMF Report:NUMBER OF TASKS, BY TYPE WORK ELAPSED ELAPSED TYPE SMF30JBN SMF30JNM SMF30DTE SMF30TME SMF30STD SMF30SIT SECS HRS _____________ ________ ________ ________ ___________ ________ ___________ ________ _______ BATCH JOBS B5A9514 STC07283 07/25/08 06:00:03.48 07/25/08 05:59:58.40 5.08 0.0014 BATCH JOBS FTPD4 STC07283 07/25/08 06:11:23.89 07/25/08 06:11:23.54 0.35 0.0001 BATCH JOBS B5A9514 STC07283 07/25/08 06:11:26.16 07/25/08 06:11:23.89 2.27 0.0006 BATCH JOBS O1X20715 JOB07291 07/25/08 06:25:49.35 07/25/08 06:25:06.68 42.67 0.0119 BATCH JOBS GSL10010 JOB02576 07/25/08 06:01:33.76 07/25/08 06:01:31.67 2.09 0.0006 BATCH JOBS AMTTRA23 JOB07284 07/25/08 06:02:38.59 07/25/08 05:59:36.87 181.72 0.0505 BATCH JOBS AMTPRM23 JOB07286 07/25/08 06:06:49.94 07/25/08 06:05:43.66 66.28 0.0184 BATCH JOBS AMTCON23 JOB07287 07/25/08 06:07:21.59 07/25/08 06:07:21.16 0.43 0.0001 BATCH JOBS BA1PORT JOB07289 07/25/08 06:09:06.37 07/25/08 06:08:45.17 21.20 0.0059 *** TOTAL FOR BATCH JOBS ( 9 ITEMS) 322.09 0.0895 STARTED TASKS B9AAQ STC07283 07/25/08 06:41:26.16 07/25/08 05:57:39.62 2,626.54 0.7296 STARTED TASKS SMFSLRD STC07285 07/25/08 06:00:14.57 07/25/08 06:00:14.46 0.11 0.0000 *** TOTAL FOR STARTED TASKS ( 2 ITEMS) 2,626.65 0.7296 TSO SESSIONS U016101 TSU07288 07/25/08 06:09:15.99 07/25/08 06:07:54.82 81.17 0.0225 TSO SESSIONS B5A9514 TSU07280 07/25/08 06:09:18.17 07/25/08 05:56:56.36 741.81 0.2061 *** TOTAL FOR TSO SESSIONS ( 2 ITEMS) 822.98 0.2286 ****** GRAND TOTAL ( 13 ITEMS) 3,771.72 1.0477
And This SMF Report:NUMBER OF TASKS, BY TYPE SUMMARY REPORT WORK ELAPSED ELAPSED TYPE SMF30JBN SMF30JNM SMF30DTE SMF30TME SMF30STD SMF30SIT SECS HRS _____________ ________ ________ ________ ___________ ________ ___________ ________ _______ *** TOTAL FOR BATCH JOBS ( 9 ITEMS) 322.09 0.0895 *** TOTAL FOR STARTED TASKS ( 2 ITEMS) 2,626.65 0.7296 *** TOTAL FOR TSO SESSIONS ( 2 ITEMS) 822.98 0.2286 ****** GRAND TOTAL ( 13 ITEMS) 3,771.72 1.0477 | ||||||||||||||||||||||||||||||||||||
Copyright 2024.
Pacific Systems Group. All rights reserved. |
Home |
Products |
Prices |
Documentation |
30-Day Trials |
Customer Reviews |
Company
| FAQ
| Sample Reports
| SMF Records
|