Go to Home Page
Questions?
Call 1-800-572-5517
 
  Go to Home Page  
  See all products
  See price schedules
  See manuals, tutorials, articles
  Download a free 30-day trial
  See user testimonials
  About Pacific Systems Group
 
 
SMF Tools
  See SMF Record Layouts
  See Sample SMF Reports
  Learn How to Export SMF Data
  Download Free SMF Reporting Software (30 days)
 
One of the greatest SMF record parsing programming languages I've ever seen. Chief, Large Systems Services Branch, NIH
  Choose Spectrum Writer to add 4GL to your product
  Report Writer Speedup Tips Article
Spectrum SMF Writer - Low-Cost 4GL Report Writer for SMF Files.

Sample Chargeback Report from SMF 30 Records

This SMF report illustrates a starting point for what could be a basic inter-department chargeback system.

This report reads the SMF file and selects just the type 30, subtype 5 (job termination) records. (See SMF 30 record layout.) It prints a detail report (one line per job) that shows some ID information (jobname, accounting data) along with the job's total CPU time and total count of EXCPs. We also print a few more items that could potentially be involved in a chargeback formula -- elapsed times, the SRB time component of the total CPU time, etc.

For demo purposes, we have multiplied the EXCP count and the CPU seconds by arbitrary per-unit costs. Now the chargeback "costs" can be shown directly in this SMF data extraction report.

One important task is choosing the info in the SMF 30 record that will assign each job to its appropriate "cost center" for charge back purposes. Possibilities include the job card accounting field, or part of the jobname itself. For this demo report, we used the first four bytes of the jobname as the cost-center identifier.

We grouped the jobs according to this jobname prefix. We sort and break on this job prefix to get total EXCP and CPU for each of these "cost centers". And also the total chargeback "dollars" for each cost center.

Once the report is fully developed and looks good at the individual job level, we would simply uncomment the SUMMARY statement (at the top) to suppress all the detail lines and turn it into an executive summary report. Then the report will just print the totals for each cost center.

This gives an idea of the sort of chargeback possibilities that exist with Spectrum SMF Writer. This low-cost program can give you an amazing amount of useful information with only minimal coding effort. It can quickly pay for itself in the amount of programming effort saved.

It's easy to report on SMF data!
 

SMF Spectrum Writer
We have a low-cost 4GL report writer especially for SMF files. It's called Spectrum SMF Writer.

Spectrum SMF Writer handles the difficult SMF record parsing for you automatically. You just specify which fields you want to see.

Spectrum SMF Writer also converts the arcane date and time fields and reformats them into an attractive report.

Plus Spectrum SMF Writer even exports SMF data as comma delimited files to use on your PC.
 
Try It FREE Now!

These Spectrum SMF Writer Statements:

*OPTION: SUMMARY     /*UN-COMMENT FOR A SUMMARY REPORT*/

**************************************************
* SPECIFY THE INPUT FILE (AND LAYOUT) FOR THIS RUN
**************************************************
INPUT: SMF30

**************************************************
* SPECIFY WHICH SMF RECORDS TO INCLUDE IN REPORT
* SUBTYPE 5 MEANS JOB TERMINATION RECORDS REPORT
**************************************************
INCLUDEIF: SMF30RTY = 30 AND SMF30STP = 5
*
**************************************************
* EXTRACT 1ST 8 BYTES OF JOBCARD ACCOUNT FIELD   *
**************************************************
COMP: ACCT(8) = #LEFT(SMF30ACT,#MIN(8,SMF30ACL))
*
**************************************************
* WE WILL TOTAL CHARGES BY LEADING PART OF JOBNAME
**************************************************
COMP: JOB_PREFIX = #LEFT(SMF30JBN,4)
*
COMP: SRB_CPU = #MAKENUM(SMF30CPS) /* CHG TIME TO SECS */

**************************************************
* COMPUTE ELAPSED TIME IN SYSTEM                 *
**************************************************
COMP: ELAP_SYS    = #MAKETIME(
       ((#MAKENUM(SMF30DTE) * 86400) + #MAKENUM(SMF30TME))
     - ((#MAKENUM(SMF30RSD) * 86400) + #MAKENUM(SMF30RST)) )

**************************************************
* COMPUTE ELAPSED EXECUTION TIME                 *
**************************************************
COMP: ELAP_EX    =
   WHEN(SMF30PPS < SMF30TME) ASSIGN( #MAKETIME(
         #MAKENUM(SMF30TME) - #MAKENUM(SMF30PPS)))
   ELSE                      ASSIGN( #MAKETIME(
 88640 + #MAKENUM(SMF30TME) - #MAKENUM(SMF30PPS)))

**************************************************
* ASSIGN A MADE-UP COST FOR DEMO PURPOSES        *
**************************************************
COMP: FAKE_IO_RATE = .01 /* PENNY PER EXCP */
COMP: FAKE_IO_CHG = SMF30TEX * FAKE_IO_RATE
*
COMP: SMF30CPT_SECS =#MAKENUM(SMF30CPT)
COMP: FAKE_CPU_RATE = 5.25 /* $5.25 PER CPU SECOND */
COMP: FAKE_CPU_CHG(2) = #MAKENUM(SMF30CPT) * FAKE_CPU_RATE
*
**************************************************
* SPECIFY WHICH SMF FIELDS TO SHOW IN RPT COLUMNS.
* WE ALSO OVERIDE SOME COLUMN WIDTHS AND HEADINGS*
**************************************************
COLUMNS:
     SMF30JBN('JOBNAME')
     JOB_PREFIX
     ACCT('JOB|CARD|ACCOUNT')
     '|'
     SMF30TEX('TOTAL|EXCPS' 11)
     FAKE_IO_RATE('I/O|RATE|(FAKE)' 6 NOACCUM)
     FAKE_IO_CHG('I/O|CHARGE|(FAKE)' 11 DOLLAR)
     '|'
     SMF30CPT_SECS('CPU|TIME|(SECS)' 8)
     FAKE_CPU_RATE('CPU|RATE|(FAKE)' 6 NOACCUM)
     FAKE_CPU_CHG('CPU|CHARGE|(FAKE)' 11 DOLLAR)
     '|'
     SRB_CPU('SRB|TIME|(SECS)' 6)
     ELAP_SYS('ELAPSED|TIME IN|SYSTEM' ACCUM)
     ELAP_EX('ELAPSED|EXECUTION|TIME'  ACCUM)

**************************************************
* SPECIFY REPORT TITLE
**************************************************
TITLE: 'CHARGE BACK RELATED JOB INFO FROM SMF 30-5 RECS'
TITLE: 'FOR' SMF30DTE


**************************************************
* SORT AND BREAK ON JOB PREFIX, WITH SUBTOTALS.  *
* (ACCT IS ANOTHER CHOICE FOR HERE)              *
**************************************************
SORT:    JOB_PREFIX
BREAK:   JOB_PREFIX  TOTALS('** TOTALS' JOB_PREFIX)

 

Produce This SMF Report:

                                    CHARGE BACK RELATED JOB INFO FROM SMF 30-5 RECS
                                                      FOR 11/30/06

                   JOB                   I/O       I/O         CPU     CPU       CPU        SRB     ELAPSED     ELAPSED
          JOB     CARD        TOTAL     RATE    CHARGE        TIME    RATE    CHARGE       TIME    TIME IN    EXECUTION
JOBNAME  PREFIX ACCOUNT       EXCPS    (FAKE)   (FAKE)       (SECS)  (FAKE)   (FAKE)      (SECS)   SYSTEM       TIME
________ ______ ________ _ ___________ ______ ___________ _ ________ ______ ___________ _ ______ ___________ ___________
AT122309  AT12           |       7,644   0.01      $76.44 |     0.31   5.25       $1.63 |   0.23 00:00:05.28 00:00:04.73
AT122109  AT12           |      18,002   0.01     $180.02 |     0.60   5.25       $3.15 |   0.46 00:00:09.80 00:00:09.01
** TOTALS AT12                  25,646            $256.46       0.91              $4.78     0.69 00:00:15.08 00:00:13.74

DUMPSMF   DUMP           |      38,489   0.01     $384.89 |     1.07   5.25       $5.62 |   0.39 00:00:37.44 00:00:00.29
** TOTALS DUMP                  38,489            $384.89       1.07              $5.62     0.39 00:00:37.44 00:00:00.29

LOGWRTR   LOGW           |          18   0.01       $0.18 |     0.26   5.25       $1.37 |   0.00 00:00:00.92 00:00:00.37
** TOTALS LOGW                      18              $0.18       0.26              $1.37     0.00 00:00:00.92 00:00:00.37

PZ144431  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:11.11 00:00:10.80
PZ144557  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:20.59 00:00:20.44
PZ144452  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:16.69 00:00:16.25
PZ144683  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:10.60 00:00:10.42
PZ144664  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:18.88 00:00:18.53
PZ144548  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:08.69 00:00:08.49
PZ144589  PZ14           |          77   0.01       $0.77 |     0.05   5.25       $0.26 |   0.00 00:00:08.68 00:00:08.51
PZ144577  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:11.96 00:00:11.77
PZ144518  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:15.80 00:00:15.63
PZ144656  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:08.91 00:00:08.73
PZ144405  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:15.84 00:00:15.66
PZ144488  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:13.64 00:00:13.34
PZ144597  PZ14           |          77   0.01       $0.77 |     0.04   5.25       $0.21 |   0.00 00:00:20.84 00:00:20.49
** TOTALS PZ14                   1,001             $10.01       0.53              $2.78     0.00 00:03:02.23 00:02:59.06

U0200021  U020  ACT123   |         153   0.01       $1.53 |     0.06   5.25       $0.32 |   0.00 00:00:00.15 00:00:00.11
U0200095  U020  ACT123   |      14,598   0.01     $145.98 |     1.74   5.25       $9.14 |   0.01 00:00:33.80 00:00:33.80
(some lines not shown)
U0240052  U024  ACT123   |       9,969   0.01      $99.69 |     1.32   5.25       $6.93 |   0.01 00:00:20.62 00:00:20.62
U0240082  U024  ACT123   |       9,975   0.01      $99.75 |     1.34   5.25       $7.04 |   0.04 00:00:29.82 00:00:29.82
U0240021  U024  ACT123   |       9,957   0.01      $99.57 |     1.27   5.25       $6.67 |   0.01 00:00:21.39 00:00:21.39
** TOTALS U024                 935,117          $9,351.17     119.44            $627.30     0.98 00:43:12.78 00:43:11.88


                                    CHARGE BACK RELATED JOB INFO FROM SMF 30-5 RECS
                                                      FOR 11/02/07
                  JOB                   I/O       I/O         CPU     CPU       CPU        SRB     ELAPSED     ELAPSED
          JOB     CARD        TOTAL     RATE    CHARGE        TIME    RATE    CHARGE       TIME    TIME IN    EXECUTION
JOBNAME  PREFIX ACCOUNT       EXCPS    (FAKE)   (FAKE)       (SECS)  (FAKE)   (FAKE)      (SECS)   SYSTEM       TIME
________ ______ ________ _ ___________ ______ ___________ _ ________ ______ ___________ _ ______ ___________ ___________

WSWS1     WSWS           |         140   0.01       $1.40 |     0.03   5.25       $0.16 |   0.01 00:00:00.31 00:00:00.31
WSWS2     WSWS           |          36   0.01       $0.36 |     0.04   5.25       $0.21 |   0.00 00:00:00.19 00:00:00.19
WSWS9     WSWS           |         138   0.01       $1.38 |     0.03   5.25       $0.16 |   0.00 00:00:00.23 00:00:00.23
** TOTALS WSWS                     314              $3.14       0.10              $0.53     0.01 00:00:00.73 00:00:00.73


****** GRAND TOTAL (   200 ITEMS)
                             1,676,156         $16,761.56     206.32          $1,083.58     2.55 01:21:07.95 01:20:24.09
See Other Sample SMF Reports
Copyright 2024.
Pacific Systems Group.
All rights reserved.


Spectrum Writer 4GL - the economical alternative to SAS, Easytrieve, DYL-280...

Home | Products | Prices | Documentation | 30-Day Trials | Customer Reviews | Company | FAQ | Sample Reports | SMF Records
Send Your Comments or Questions