Running the SMF data set dump program

IBM® recommends that you use the IEFU29 SMF dump exit to run the SMF data set dump program. When the current recording data set cannot hold any more records, the SMF writer routine automatically switches recording from the active SMF data set to an empty SMF data set, and passes control to the IEFU29 dump exit. This avoids the need for operator intervention. See z/OS MVS Installation Exits for more information about the IEFU29 dump exit.

Another method to run the SMF data set dump program is shown (sample JCL) in Figure 1. The output is a non-temporary data set on a standard-labeled tape. The operator should record the volume serial number of the output data set so that other jobs can reference it. In this example, the DCB= keyword is not specified, so the SMF data set dump program assigns the following DCB attributes.

SMF records created by IBM components never exceed 32,756 bytes. If the data required in a record would cause the record to exceed that length, the component responsible for creating the record would, instead, create multiple (continuation) records, none of which would exceed 32,756 bytes. (See Record Type 30 (1E) — Common address space work for an example.) SMF records are written as spanned (VBS) in order to conserve storage space by ensuring that each block of data is as full as possible. If you specify DCB parameters on any of the input or output DD statements for IFASMFDP, you must specify RECFM=VBS. You should not specify LRECL=X for reading or writing SMF dump data, because LRECL=X signifies that a single record may be larger than 32,756 bytes, which is not the case for SMF data.

You can specify LRECL=32760 instead of 32767. You can also specify any block size from 4096 to the maximum allowed for the chosen device.

Figure 1. Sample JCL for running the SMF data set dump program
//DUMPX     JOB   MSGLEVEL=1
//STEP1     EXEC  PGM=IFASMFDP
//DUMPIN    DD    DSN=data set name, DISP=SHR
//DUMPOUT   DD    DSN=SMFDATA,UNIT=tapeaddr,
//                DISP=(NEW,KEEP),LABEL=(,SL),VOL=SER=serial
//SYSPRINT  DD    SYSOUT=A
Figure 2 shows a sample job using the SMF data set dump program to dump and clear an SMF data set (INDD1) and to combine its records with those in an old dumped data set (INDD2) to three data sets.
Figure 2. Sample Job for Dumping SMF Data Sets
//IFASMFDP  JOB   accounting information
//STEP      EXEC  PGM=IFASMFDP
//INDD1     DD    DSN=SYS1.MANB,DISP=SHR
//INDD2     DD    DSN=SMFDATA,UNIT=TAPE,DISP=SHR,VOL=SER=SMFTAP
//OUTDD1    DD    DSN=ALLSMF.TYPE0.TYPE40,DISP=SHR
//OUTDD2    DD    DSN=ALLSMF.TYPE10.TYPE255,DISP=SHR,DCB=BLKSIZE=32000
//OUTDD3    DD    DSN=ALLSMF.TYPE10.TYPE255B,DISP=SHR,DCB=LRECL=32760
//SYSPRINT  DD    SYSOUT=A
//SYSIN     DD    *
       INDD(INDD1,OPTIONS(ALL))
       INDD(INDD2,OPTIONS(DUMP))
       OUTDD(OUTDD1,TYPE(0,2,10,15:40))
       OUTDD(OUTDD2,TYPE(10:255))
       OUTDD(OUTDD3,TYPE(10:255))
       DATE(92002,92366)
       SID(308A)
       SID(308B)
/*
Figure 2 illustrates the following:

There can be any number of input (INDD) or output (OUTDD) files in the SMF data set dump program. The input files are dumped in reverse order unless concatenated under one input file. For example, in Figure 2, two input files are specified. After the SMF data set dump program is processed, the output file contains the records from INDD2 first, followed by the records from INDD1.

After the SMF data set dump program job shown in Figure 2 runs, the information shown in Figure 3 is listed in the SYSPRINT data set.
Figure 3. Example output listed in SYSPRINT data set
SMF DUMP PARAMETERS
SID(308A) - SYSIN
SID(308B) - SYSIN
END(2400) - DEFAULT
START(0000) - DEFAULT
DATE(92002,92366) - SYSIN
OUTDD(OUTDD3,TYPE(10:255)) - SYSIN
OUTDD(OUTDD2,TYPE(10:255)) - SYSIN
OUTDD(OUTDD1,TYPE(0,2,10,15:40)) - SYSIN
INDD(INDD2,,OPTIONS(DUMP)) - SYSIN
INDD(INDD1,OPTIONS(ALL)) - SYSIN
One method of running the SMF data set dump program is to enter jobs that specify the SMF data set dump program into the system, and hold them on the job queue until a dump is required. Another method is to start a reader to an input stream containing the JCL for the SMF data set dump program. Figure 4 shows two sample procedures (DUMPX and DUMPY) for dumping the SMF data sets to a standard-labeled tape (VOL=SER=SMFTAP) with the operator START command. In both procedures, the default tape specified on the PROC statements is 192. Figure 4 shows sample JCL for adding these procedures to SYS1.PROCLIB.
Figure 4. Sample procedures for dumping the SMF data sets
//UPDATE    JOB   MSGLEVEL=1
//UPDATE    EXEC  PGM=IEBUPDTE,PARM=NEW
//SYSUT1    DD    DSN=SYS1.PROCLIB,DISP=SHR
//SYSUT2    DD    DSN=SYS1.PROCLIB,DISP=SHR
//SYSPRINT  DD    SYSOUT=A
//SYSIN     DD    DATA
./          ADD   NAME=DUMPX,LIST=ALL
//DUMPX     PROC  TAPE=192
//SMFDMP    EXEC  PGM=IFASMFDP
//DUMPIN    DD    DSNAME=SMFDATA,UNIT=&TAPE,DISP=(MOD,KEEP),
//                LABEL=(,SL),VOL=SER=SMFTAP
//SYSPRINT  DD    SYSOUT=A
./          ADD   NAME=DUMPY,LIST=ALL
//DUMPY     PROC  TAPE=192
//SMFDMP    EXEC  PGM=IFASMFDP
//DUMPIN    DD    DSNAME=SYS1.MANY,DISP=SHR
//DUMPOUT   DD    DSNAME=SMFDATA,UNIT=&TAPE,DISP=(MOD,KEEP),
//                LABEL=(,SL),VOL=SER=SMFTAP
//SYSPRINT  DD    SYSOUT=A
./ENDUP
/*
Figure 5 shows an example to get statistics information for type 90 and 101 records with the FLDSTATS parameter. This job will gather statistics individually for type 90 and 101 and also for them combined. Each interval will consist of 1000 records.
Figure 5. Sample JCL for dumping a SMF log stream with the FLDSTATS option
//RUNSMFDP JOB  MSGLEVEL=(1,1),NOTIFY=&SYSUID                    
//SMFDMP   EXEC PGM=IFASMFDP                                     
//DUMP03   DD DSN=SYS1.MANQ,DISP=SHR,VOL=SER=183PAK,UNIT=3390    
//DUMP04   DD DUMMY                                              
//SYSPRINT DD SYSOUT=*                                           
//SYSIN    DD *                                                      
	 INDD(DUMP03,OPTIONS(DUMP))                                       
 	 OUTDD(DUMP04,TYPE(90,101))        
	 FLDSTATS(1000) 

The CLEAR function of the SMF data set dump program requires APF-authorization. Running the SMF data set dump program shown in the above JCL examples preserves the APF-authorization assigned to the SMF data set dump program. Invoking the SMF data set dump program in any way other than as shown above (for example, invoking the SMF data set dump program from another program or invoking it as a TSO/E command), might cause it to lose its authorization.

The DUMP function is permitted in an unauthorized environment. If the CLEAR function is attempted in an unauthorized environment, a message is written indicating the request was denied.

For more information on APF-authorization, see z/OS MVS Programming: Authorized Assembler Services Guide. For more information on running authorized programs under TSO/E, see z/OS TSO/E Customization.

The dump utility of the SMF data set dump program issues the following return codes:
Code
Meaning
00
The dump was successful; no errors were encountered.
04
The dump was successful; one or more errors were detected but processing continued.
08
The dump was not successful; an error terminated processing.