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.

CICS Down Time Report from SMF 5 Records

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!


The SMF report below was created with Spectrum SMF Writer, the low-cost 4GL report writer for SMF files.

In this report we want to show what percentage of the past month each of our CICS regions was up and running (or what percentage it was down.) To do this, we read that full month's SMF records. (We must also ensure that we read enough records from the current month to get the job termination record for the final CICS session that began in the previous month.) From this input, we select just the SMF type 5 (Job Termination) records for jobs beginning with "CICSP".

SMF writes one type 5 record each time a background job terminates. This record includes the job's begin and end date/time, which we can use to compute the session's elapsed time. For the final session of the month, we use the end of the month as the "end time" for our elapsed time computation. And, for the first session of the month we use the beginning of the month as the "begin time" for the computation. We sort the report on CICS region to sort all of the sessions for each region together. We add a BREAK statement on region to get region totals for the month. These totals that automatically print tell us the total up-hours for each region for the last month.

For each session, we also compute its elapsed time as a percentage of the total hours in the month. While not very meaningful for an individual session, in the total line we can see what percentage of the month the CICS region was available -- a very useful number to monitor on a month to month basis.

(By uncommenting the SUMMARY option statement below, you can omit the detailed session lines and see just one total line for each CICS region for the month. A perfect executive level report!)

Note that this report makes extensive use of Spectrum SMF Writer's many powerful date and time computational functions. We use them to: determine the begin and end dates of the previous calendar month; to compute elapsed time from one date/time to another date/time, and convert that to into hours; and to calculate the exact number of hours in the previous month. This report can run each month without requiring any manual changes to the control statements.

All of this useful executive information with just a few lines of code!
Why not install a Spectrum SMF Writer trial right now and start making your own SMF reports!

These Spectrum SMF Writer Statements:

*OPTION:    SUMMARY
INPUT:     SMF05 /* COPIES FILE DEF STMTS AUTOMATICALLY */
INCLUDEIF: SMF5RTY = 5 AND  SMF5JBN : "CICSP"

*COMPUTE: REPORT-MONTH =    9/1/2010 /* OVERRIDE MONTH BEGIN */
*COMPUTE: REPORT-MONTH-E = 9/30/2010 /* OVERRIDE MONTH END */
COMPUTE: REPORT-MONTH =#BEGMONTH(#INCDATE(-1,MONTHS)) /*BEG LAST MNTH*/    
COMPUTE: REPORT-MONTH-E =#ENDMONTH(#INCDATE(-1,MONTHS))/*END LAST MNTH*/
  
COMPUTE: CICS-START = #BEGMONTH(SMF5RSD)  /* REC'S START YYMM01 */       
COMPUTE: CICS-END   = #BEGMONTH(SMF5DTE)  /* REC'S END YYMM01 */         

COMPUTE: ELAPSED-HOURS =  WHEN(CICS-START = CICS-END) /*WITHIN MONTH*/ 
 ASSIGN( ((#MAKENUM(SMF5DTE)*86400+#MAKENUM(SMF5TME)) / 3600)          
     -   ((#MAKENUM(SMF5RSD)*86400+#MAKENUM(SMF5RST)) / 3600) )
        
                            WHEN(CICS-START < REPORT-MONTH) /*1ST SESS*/
 ASSIGN( ((#MAKENUM(SMF5DTE)*86400+#MAKENUM(SMF5TME)) / 3600)          
     -   ((#MAKENUM(REPORT-MONTH)*86400+#MAKENUM(00:00:00)) / 3600) )  

                            ELSE /* LAST SESSION IN MONTH */    
 ASSIGN( ((#MAKENUM(REPORT-MONTH-E)*86400+#MAKENUM(23:59:59)) / 3600)
     -   ((#MAKENUM(SMF5DTE)*86400+#MAKENUM(SMF5TME)) / 3600) )   

COMPUTE: PCT-MONTH(6) = ELAPSED-HOURS * 100 /                        
         (24 * (#MAKENUM(REPORT-MONTH-E) - #MAKENUM(REPORT-MONTH) +1))

TITLE:     'CICS UP TIME REPORT'
                            ELSE /* LAST SESSION IN MONTH */           
TITLE:     'FOR MONTH'
TITLE:     REPORT-MONTH 'THRU' REPORT-MONTH-E

COLUMNS:   SMF5JBN SMF5RSD SMF5RST SMF5DTE SMF5TME
           ELAPSED-HOURS PCT-MONTH(PIC'Z9.99%')

SORT:      SMF5JBN SMF5DTE SMF5TME
BREAK:     SMF5JBN

 

Produce This SMF Report:

                          CICS UP TIME REPORT                                                                                       
                               FOR MONTH                                                                                            
                         09/01/10 THRU 09/30/10                                                                                     

                                                          ELAPSED          PCT                                                        
SMF5JBN  SMF5RSD    SMF5RST   SMF5DTE    SMF5TME           HOURS          MONTH                                                     
________ ________ ___________ ________ ___________ _____________________ _______                                                            
                                                                                                                                    
CICSPX22 08/29/10 01:09:58.41 09/05/10 00:41:46.84             96.696344  12.97%                                                          
CICSPX22 09/05/10 00:48:45.41 09/05/10 01:03:18.31              0.242472   0.03%                                                          
CICSPX22 09/05/10 01:11:06.60 09/12/10 01:02:54.80            167.863389  22.56%                                                          
CICSPX22 09/12/10 01:08:19.14 09/19/10 01:02:37.10            167.904989  22.57%                                                          
CICSPX22 09/19/10 01:28:26.17 09/25/10 02:11:13.49            144.713145  19.45%                                                          
CICSPX22 09/25/10 03:15:43.81 09/26/10 01:02:19.81             21.776667   2.93%                                                         
CICSPX22 09/26/10 01:07:17.08 10/03/10 01:02:59.65            118.878311  15.98%                                                          
*** TOTAL FOR CICSPX22 (    7 ITEMS)                          718.075317  96.52%                                                          

                                                                                                                                    
CICSPX23 08/29/10 01:09:56.36 09/05/10 00:41:58.09             96.699469  12.98%                                                          
CICSPX23 09/05/10 00:48:43.33 09/05/10 01:03:26.26              0.245258   0.03%                                                          
CICSPX23 09/05/10 01:11:04.59 09/12/10 01:03:04.44            167.866625  22.56%                                                          
CICSPX23 09/12/10 01:08:17.10 09/19/10 01:02:48.56            167.908739  22.57%                                                                                                                     
CICSPX23 09/19/10 01:28:24.12 09/25/10 02:11:32.29            144.718936  19.45%                                                                                                                     
CICSPX23 09/25/10 03:15:42.77 09/26/10 01:02:28.82             21.779458   2.93%                                                            
CICSPX23 09/26/10 01:07:15.02 10/03/10 01:03:14.93            118.878883  15.98%                                                                                                                      
*** TOTAL FOR CICSPX23 (    7 ITEMS)                          718.097368  96.52%                                                          

                                                                                                                                    
CICSPX24 08/29/10 01:09:54.35 09/05/10 00:41:33.96             96.692767  13.00%                                                          
CICSPX24 09/05/10 00:48:41.31 09/05/10 01:03:00.58              0.238686   0.03%                                                          
CICSPX24 09/05/10 01:11:02.67 09/12/10 01:02:45.38            167.861864  22.56%                                                          
CICSPX24 09/12/10 01:08:15.06 09/19/10 01:02:22.82            167.902155  22.57%                                                          
CICSPX24 09/19/10 01:28:22.10 09/25/10 02:11:13.33            144.714230  19.45%                                                          
CICSPX24 09/25/10 03:15:41.74 09/26/10 01:02:15.26             21.775978   2.93%                                                         
CICSPX24 09/26/10 01:07:13.00 10/03/10 01:02:58.30            118.879444  15.98%                                                          
*** TOTAL FOR CICSPX24 (    7 ITEMS)                          718.065124  96.51%                                                         

                                                                                                                                                                                                                                                                      
CICSPX31 08/29/10 01:10:18.61 09/05/10 00:44:10.47             96.736242  13.00%                                                            
CICSPX31 09/05/10 00:49:05.58 09/05/10 01:03:59.59              0.248336   0.03%                                                            
CICSPX31 09/05/10 01:11:26.83 09/12/10 01:05:24.83            167.899445  22.57%                                                          
CICSPX31 09/12/10 01:08:39.35 09/19/10 01:08:30.34            167.997497  22.58%                                                          
CICSPX31 09/19/10 01:28:46.42 09/24/10 11:30:13.36            130.024150  17.48%                                                          
CICSPX31 09/24/10 11:30:31.77 09/24/10 11:30:51.62              0.005514   0.00%                                                         
CICSPX31 09/25/10 03:15:50.96 09/25/10 03:41:28.41              0.427069   0.06%                                                         
CICSPX31 09/25/10 03:45:47.20 09/26/10 01:02:42.52             21.282033   2.86%                                                         
CICSPX31 09/26/10 01:07:37.33 10/03/10 01:03:23.04            118.872686  15.98%                                                          
*** TOTAL FOR CICSPX31 (    9 ITEMS)                          703.492972  94.56%                                                          

...

See Other Sample SMF Reports
Copyright 2017.
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