The source is here REXX SMF
This is a TSO transmit format dataset,
to unpack it ftp it to OS/390 using binary transfer lrecl=80 recfm=fb and blksize=3120 (One track is enough).
Then use the TSO command RECEIVE INDATASET(mydata) where mydata is the name of the dataset
your transfered to MVS via ftp.
Here is some JCL to start your run.
You should preallocate the PDS-E TCP0.CSTM.OUTPUT.SMF to be large as it contains all your decoded SMF data.
Mine looks like this PO-E VB 32756 32760. Create a member called TELNETO in this PDS-E with
nothing in it before your first run.
//*********************************************************************
//*** SMF READ PROGRAM ***
//*** TO OUTPUT USE DUMP OR NODUMP AS PARAMETER ***
//*********************************************************************
//STEP0010 EXEC PGM=IKJEFT01,PARM='%READSMF DUMP'
//SYSEXEC DD DISP=SHR,DSN=TCP0.CSTM.EXEC
//DUMPIN DD DISP=SHR,DSN=
TCP0.CSTM.CONTROL(SMF118) contains the select statements for the SMF records you are interested in ie:
OUTDD(DUMPOUT,TYPE(118))
INDD(DUMPIN,OPTIONS(DUMP))
TCP0.CSTM.CONTROL(S118TS) contains sort statements required to remove duplicates namely
SORT FIELDS=(5,166,CH,A)
SUM FIELDS=NONE
INCLUDE COND=(5,5,CH,GT,C'99067')
I generate it with a simple rexx so that the date field is always correctly set.
/*REXX make the CONTROL STATEMENETS FOR THE SMF SORT */
datej=DATE('J') /*yyddd*/
year=substr(datej,1,2)
day=substr(datej,3,3)
day=day-30
if day < 1 then do;day=day+366;year=year-1;end
day=right(day,3,"0")
mydate=year||day
QUEUE " SORT FIELDS=(5,166,CH,A)"
QUEUE " SUM FIELDS=NONE"
QUEUE " INCLUDE COND=(5,5,CH,GT,C'"mydate"')"
"EXECIO 3 DISKW CARD ( FINIS"
"EXECIO * DISKR CARD ( STEM CARD. FINIS"
do index = 1 to card.0
say date() time() "ALTCP001I " card.index
end