Hello,
Before I jump into the thick of things, apologies, even though I have some experience with formatted-SMF-records, I am a beginner of beginners in raw-SMF-data processing.
I wrote a few quick-crude DFSORT steps to extract the various data types and format them.
Type-61:
//STEP002 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=<MAN DATASET>
//SORTOUT DD DSN=MY.DS,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(2,5),RLSE)
//*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(6,1,CH,EQ,X'3D') --> TYPE 61
/*
//*
//STEP003 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//SMF DD DISP=SHR,DSN=MY.DS
//REPORT DD SYSOUT=*
//*
//TOOLIN DD *
DISPLAY FROM(SMF) LIST(REPORT) -
HEADER('JOB NAME') ON(51,8,CH) -
HEADER('TIME') ON(59,4,TM1,E'99:99:99') -
HEADER('DATE') ON(63,4,DT1) -
HEADER('DS NAME') ON(121,44,CH)
/*
Unless I haven't messed up the extraction/formatting, I didn't find a temporary dataset in this list.
Post this I browsed the unformatted SMF data in the MAN dataset, I could see that type 14/15/42 had entries for temporary datasets (x'0E', X'0F' and X'2A' at column-2 with HEX ON).
Second job run on type-14, which by the description looked closer to my current requirement:
//STEP002 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=<MAN DS>
//SORTOUT DD DSN=MY.DS,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(2,5),RLSE)
//*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(6,1,CH,EQ,X'0E') *SMF TYPE- 14
/*
//*
//STEP003 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//SMF DD DISP=SHR,DSN=MY.DS
//REPORT DD SYSOUT=*
//*
//TOOLIN DD *
DISPLAY FROM(SMF) LIST(REPORT)
TITLE('SMF TYPE 14')
HEADER('JOB NAME') ON(19,8,CH) -
HEADER('TIME') ON(27,4,TM1,E'99:99:99') -
HEADER('DATE') ON(31,4,DT1,E'9999/99/99') -
HEADER('OWNER') ON(35,8,CH) -
HEADER('REC INDICATOR') ON(43,2,BI,E'9999') -
HEADER('TIME DS OPEN') ON(49,4,TM1,E'99:99:99') -
HEADER('DD NAME') ON(57,8,CH) -
HEADER('DSN') ON(69,44,CH) -
BLANK
/*
Output for this appears as below:
JOB NAME TIME DATE OWNER REC INDICATOR TIME DS OPEN DD NAME DSN
-------- -------- ---------- -------- ------------- ------------ -------- --------------------------------------------
XXXXXXXX 13:24:35 2016/12/27 STCUSR 8196 13:24:43 SYS00001 SYS16362.T132442.RA000.XXXXXXXX.R0167641
XXXXXXXX 13:24:35 2016/12/27 STCUSR 8196 13:24:43 SYS00001 SYS16362.T132442.RA000.XXXXXXXX.R0167641
XXXXXXXX 13:24:35 2016/12/27 STCUSR 8196 13:24:43 SYS00002 SYS16362.T132442.RA000.XXXXXXXX.R0167642
XXXXXXXX 13:24:35 2016/12/27 STCUSR 8196 13:24:43 SYS00002 SYS16362.T132442.RA000.XXXXXXXX.R0167642
The point where I am now stuck is:
a. How do I add the sub-types to this extraction? If I've understood it right, I'll have to add the length of each type to reach the starting position of the type I am looking for. And from that point onwards, add the offset of the field I am looking for to extract the exact data. For example, to extract the UCB section data, I'll have to add the lengths of all the preceding sections and then add the offset of the field I am looking for.
b. SMF14RIN which is reflecting as 8196 here, I am unsure if my data conversion was correct; though DFSORT has basically done what I asked it to do- convert binary to displayable data, but I am sure the code is messed up.
Any guidance is much appreciated, this is one opportunity for me to really get in and finally learn basics of SMF data processing.
PS: Other record types were also extracted in a similar manner, with similar challenges.