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
  Free 60-Page Book (PDF) - How to Make an SMF Report
Spectrum DCOLLECT Reporter - the 4GL DCOLLECT Report Writer.

Spectrum SMF Writer - the 4GL SMF Report Writer.

SMF Type 5 Record

This table shows the record layout for type 5 SMF records
(Job Termination).

List of other SMF record layouts available.
List of sample SMF reports.

Purpose: Record type 5 is written at the normal or abnormal termination of a background job.

Note: IBM recommends that you use record type 30 rather than record types 4, 5, 20, 34, 35, and 40. Use of record type 5 may cause you to miss key workload indicators.

This record identifies the job by job log identification, user identification, priority, input class, and programmer’s name. If accounting numbers (which can be alphameric) were specified in the JOB statement, they are included. The job name, time, and date that the reader recognized the Job card (for this job) constitute the job log identification. If the job that is terminating is ‘JES2’ or ‘JES3’ then these might be set to zero.

This record also contains operating information such as:

  • The job step start and end times
  • Number of steps in the job
  • Number of records in DD DATA and DD* data sets (processed by the job)
  • Job termination status
  • Device class
  • Unit type
  • Storage protect key
  • Job service and job CPU time (the job CPU time equals the sum of the job step times).

When a step in a multi-step job terminates abnormally, the subsequent steps, whether processed or flushed, do not propagate the step abend code for processing by this record. The code appears in the step termination record (type 4). Offset 55, can contain X'nnnn' or X'0000' (the job termination indicator (offset 65, bit 6) is set to 1 if an abend occurred in the job).

It's easy to report on SMF 5 data! (Jump to sample reports)

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 can export SMF data as comma delimited files to use on your PC.
 
Try It FREE Now!

SMF Type 5 Record -- Job Termination
Offset
(Dec.)
Offset
(Hex)
NameLengthFormatDescription
00SMF5LEN2binary
Record length. This field and the next field (total of four bytes) form the RDW (record descriptor word). See “Standard SMF Record Header” on page 13-1 for a detailed description.
22SMF5SEG2binary
Segment descriptor (see record length field).
44SMF5FLG1binary
System indicator: Bit Meaning When Set 0-2 Reserved 3-6 Version indicators* 7 Reserved.*See “Standard SMF Record Header” on page 13-1 for a detailed description.
55SMF5RTY1binary
Record type 5 (X'05').
66SMF5TME4binary
Time since midnight, in hundredths of a second, that the record was moved into the SMF buffer.
10ASMF5DTE4packed
Date when the record is passed to the SMF writer, in the form 0cyydddF. See “Standard SMF Record Header” on page 13-1 for a detailed description. This is the date that the job terminated.
14ESMF5SID4EBCDIC
System identification (from the SID parameter).
1812SMF5JBN8EBCDIC
Job name. The job name, time, and date that the reader recognized the JOB card (for this job) constitute the job log identification, or transaction name (for APPC output).
261ASMF5RST4binary
Time since midnight, in hundredths of a second, that the reader recognized the JOB card (for this job).
301ESMF5RSD4packed
Date when the reader recognized the JOB card (for this job), in the form 0cyydddF. See “Standard SMF Record Header” on page 13-1 for a detailed description.
3422SMF5UIF8EBCDIC
User-defined identification field (taken from common exit parameter area, not from USER=parameter on job statement).
422ASMF5NST1binary
Number of steps in the job.
432BSMF5JIT4binary
Time since midnight, in hundredths of a second, that the initiator selected the job.
472FSMF5JID4packed
Date when the initiator selected the job, in the form 0cyydddF. See “Standard SMF Record Header” on page 13-1 for a detailed description.
5133SMF5NCI4binary
Number of card-image records in DD DATA and DD* data sets read by the reader for the job.
5537SMF5JCC2binary
Job completion code: X'0ccc' indicates system ABEND in the last job step where ccc is the system ABEND code (see z/OS MVS System Codes). X'8ccc' indicates user ABEND in the last job step where ccc is the user ABEND code. X'nnnn' indicates normal completion where nnnn is the contents of the two low-order bytes in register 15 at termination. X'0000' indicates either: (see note) 1. The last job step was flushed (not processed) because of an error during allocation or in a preceding job step, or 2. normal job completion with a return code of 0.Note: When a step in a multi-step job terminates abnormally, the subsequent steps, whether executed or flushed, do not propagate the step abend code for processing this record. The code appears in the job termination record (type 4). In this case, the field - SMF5JCC, can contain X'nnnn'. If an abend occurred in the job, the job termination indicator (bit 6 in the SMFJBTI field) is set to 1. Use this field in conjunction with the job termination indicator field, SMFJBTI.
5739SMF5JPTY1binary
Job selection priority. This field normally equals the user-assigned priority of zero to 13, but if the job fails while being scheduled, this field equals 14 (taken from the PRTY parameter on the JOB card). If no value is specified for the PRTY parameter on the JOB card, this field contains: v For JES3, the default priority specified on the JES3 STANDARDS initialization card v For JES2, a zero.Note that JES2 does not use the priority value reported in this field.
583ASMF5RSTT4binary
Time since midnight, in hundredths of a second, that the reader recognized the end of the job.
623ESMF5RSTD4packed
Date when the reader recognized the end of the job, in the form 0cyydddF. See “Standard SMF Record Header” on page 13-1 for a detailed description.
6642SMF5JBTI1binary
Bit Meaning When Set 0 Reserved 1 Canceled by exit IEFUJV 2 Canceled by exit IEFUJI 3 Canceled by exit IEFUSI 4 Canceled by exit IEFACTRT (step exit only) 5 Reserved 6 If 0, normal completion (if 1, then ABEND). 7 Reserved.
6743SMF5MCI1--
Reserved.
6844SMF5TRAN4binary
Job transaction residency time, in 1024-microsecond units. That is the total amount of time the transaction was in central storage.
7248SMF5CKRE1--
Reserved.
7349SMF5RDCL1binary
Reader device class. (This field is not filled in for jobs submitted by way of an internal reader.)
744ASMF5RUTY1binary
Reader unit type. (This field is not filled in for jobs submitted via an internal reader.)
754BSMF5JICL1EBCDIC
Job input class (taken from JOB card; default equals ‘A’).
764CSMF5SPK1binary
Storage protect key, in the form xxxx0000 where xxxx is the key.
774DSMF5SRBT3binary
Job CPU time under SRBs, in hundredths of a second. This field includes the CPU time for various supervisory routines that are dispatched via SRBs: locking routines, page resolution, swap control, cross-memory communications (WAIT, POST, I/0 POST), and TQE scheduling.
8050SMF5TJS4binary
Job service, in service units.
8454SMF5TTAT4binary
Job transaction active time, in 1024-microsecond units.
8858SMF5RV24--
Reserved.
925CSMF5PGNO2binary
Reserved.
945ESMF5RV32--
Reserved.
9660SMF5TLEN1binary
Length of rest of the fixed portion of the record.
9761SMF5PRGN20EBCDIC
Programmer’s name.
11775SMF5JCPU3binary
Reserved.
12078SMF5ACTF1binary
Number of accounting fields.
12179SMF5JSAFvariableEBCDIC
Accounting fields. Each entry for an accounting field contains the length of the field (one byte, binary) followed by the field (EBCDIC). A zero indicates an omitted field.
Relocate Section
(Offset from beginning of record: 96 + SMF5TLEN)
00SMF5CPUS4binary
Job CPU service, in service units.
44SMF5IOCS4binary
Job I/O service in service units.
88SMF5MSOS4binary
Job main storage service, in service units.
12CSMF5SRBS4binary
Job SRB service, in service units.
1610SMF5RSV18Reserved.

The table above is based on the description provided by IBM in its "MVS Systems Management Facilities (SMF)" manual.

CICS Down Time Report from SMF 5 Records


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'
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 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