Lesson 3: Use z/OS SMF to produce CICS string wait report

Requirement:
Produce a CICS file string wait report from CICS SMF interval statistics.

Solution:
CICS records SMF statistics regularly into SMF.

SMF type 110 is generated from CICS. CICS does not follow standard SMF triplet to build each section in SMF record. Following program will reformat each SMF record containing multiple CICS sections into multiple SMF records with each SMF record containing only one CICS section.
//         EXEC LKED                    
//LKED.SYSLMOD  DD DISP=SHR,DSN=&LINKLIB
//OBJ      DD  DISP=SHR,DSN=GREPPER.JCLLIB     
//SYSIN    DD  *                        
  INCLUDE OBJ(EFHE15O)                  
  NAME   EFHE15A(R)                     
/*                                     
The output file from EFHE15A E15 exit can be processed by E15 exit program generated from GREPST, GREPEM, GREPDM, GREPE, GREPD macros.
//DFHTFCT  EXEC ASMACL,PARM.L='MAP,LET,LIST'
//C.SYSIN  DD  DISP=SHR,DSN=GREPPER.JCLLIB(GREP)
//         DD  *
          DFHSTSMF PREFIX=SMF     SMF HEADER                    <==  1
          COPY  DFHSTIDS          CICS STATISTICS RECORD
          COPY  DFHA17DS          FILE RESOURCE STATISTICS PERFORMANCE
          GREPST HEADER=NO                                      <==  2
          GREPEM STSMFDS,SMFSTAPS,SMFSTLPS,SMFSTNPS,            <==  3 *
               STSMFDS,                                                *
               (SMFSTSPN,SMFSTDAT,SMFSTCLT),                           *
               OFFADJ=STSMFDS-SMFSTRVN
          GREPE  STSMFDS,SMFSTASS,DFHA17DS,A17FNAM   FCT        <==  4
          GREPE  STSMFDS,SMFSTASS,DFHA17DS,A17DSTSW  TOTAL STRING WAITS
          GREPE  STSMFDS,SMFSTASS,DFHA17DS,A17DSHSW  MAX CONCURR WAITS
          GREPE  STSMFDS,SMFSTASS,DFHA17DS,A17DSNAM  DATASET NAME
          END
/*
//C.SYSLIB DD   DISP=SHR,DSN=CICSTS.SDFHMAC
//L.SYSLMOD  DD DISP=(OLD,PASS),DSN=&LINKLIB
//L.OBJ      DD DISP=SHR,DSN=GREPPER.JCLLIB
//L.SYSIN  DD  *
  INCLUDE OBJ(GREP15O)
  ENTRY  $MODE15
  NAME   EFHTFCT(R)
/*
1) introduce type 110 and CICS SMF DSECT to the program
2) do not extract the SMF header.
3) extract CICS job name(SMFSTSPN), date(SMFSTDAT) and time(SMFSTCLT) from STSMFDS section referred by SMFSTAPS, with section size SMFSTLPS and section count SMFSTNPS referred by STSMFDS. As the SMFSTAPS is not defined as separate DSECT, the offset is required to be adjusted by OFFADJ parameter.
4) The required fields are extracted by GREPE macro from DFHA17DS section referred by SMFSTASS offset referenced by STSMFDS DSECT.
//GENREP   EXEC PGM=ICETOOL,REGION=20M,COND=(0,NE)
//MODLIB   DD   DISP=SHR,DSN=&LINKLIB             
//TOOLIN   DD   *                          
 COPY FROM(SMFIN)              USING(AM01) 
*                                         
* FOR STRING WAIT REPORT                  
*                                         
 COPY FROM(T3)      TO(REPORT) USING(AMF1)
/*
//AM01CNTL DD   *                    
  MODS E15=(EFHE15A,102400,MODLIB)   
  OUTFIL FNAMES=T3,                                
   INCLUDE=(161,2,BI,EQ,67)     * GREP FOR DFHA17DS
/*
//AMF1CNTL DD   *                                  
 MODS E15=(EFHTFCT,102400,MODLIB)                  
 OMIT COND=(35,4,BI,EQ,0)                          
 INREC BUILD=(1,4,5,8,X,13,2,C'/',15,2,C'/',17,4,X,
                        21,2,C':',23,2,C':',25,2,X,
                        27,8,                      
                        35,4,BI,LENGTH=7,          
                        39,2,BI,LENGTH=4,          
                        41,44)                     
 OUTFIL VTOF,BUILD=(5,80)                          
/*                                     
Copy step using AM01CNTL reformat SMF Type 110 record to standard SMF record via EFHE15A exit and then filter out only record 67 (file control) to T3 file.
Copy step using AMF1CNTL extract file name, total number of string waits, maximum number of concurrent string waits and dataset name into report using EFHTFCT generated from previous steps.

z/OS, CICS, MQSeries, WebSphere are trademarks of International Business Machines Corporation.
Copyright © 2025 smfgrepper.com