SMF logfile retrieval JCL

Using the sort sysin statement as shown in this example, the SMF headers are removed, rendering the output in a format which can be handled by the FM/IMS print program.

Figure 1. SMF log file Retrieval
        //EXTRACT EXEC PGM=IFASMFDP
        //SYSPRINT DD SYSOUT=*
        //SMFIN    DD DISP=SHR,DSN=your.install.SMF.logfile
        //DUMP     DD DISP=(NEW,PASS,DELETE),DSN=whatever.you.wanna.callit,
        //            DCB=*.SMFIN,UNIT=unit,SPACE=(cyl,(prim,sec),RLSE)
        //SYSPRINT DD SYSOUT=*
        //SYSIN    DD *
          INDD(SMFIN,OPTIONS(DUMP))
          OUTDD(DUMP,TYPE(your SMF rec id))
        //*
        //SORT     EXEC PGM=SORT,COND=(0,LT)
        //SYSUDUMP DD SYSOUT=0
        //SYSPRINT DD SYSOUT=*
        //SYSOUT   DD SYSOUT=*
        //SORTIN   DD DISP=(OLD,DELETE,DELETE),DSN=*.EXTRACT.DUMP
        //SORTOUT  DD DISP=(NEW,CATLG,DELETE),DSN=whatever.you.wanna.callit,
        //            DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760),
        //            UNIT=unit,SPACE=(cyl,(prim,sec),RLSE)
        //SORTWK01 DD UNIT=unit,SPACE=(cyl,(prim,sec),RLSE)
        //SORTWK02 DD UNIT=unit,SPACE=(cyl,(prim,sec),RLSE)
        //SORTWK03 DD UNIT=unit,SPACE=(cyl,(prim,sec),RLSE)
        //SORTWK04 DD UNIT=unit,SPACE=(cyl,(prim,sec),RLSE)
        //SYSIN    DD *
          SORT FIELDS=(47,08,CH,A,
                       11,04,CH,A,
                       07,04,CH,A,
                       15,04,CH,A,
                       31,08,CH,A)
          INCLUDE  COND=(6,1,CH,EQ,X'your SMF rec id')
          OPTION   EQUALS
          OUTREC   FIELDS=(1:1,4,5:19)
        /*