View previous topic :: View next topic
|
Author |
Message |
upendrasri
Active User
Joined: 28 Sep 2017 Posts: 121 Location: India
|
|
|
|
Hi ,
Am trying to extract information from SMF Dump using ICETOOL . The below JCL am using for SMF Type 65 records.
Code: |
//SMFRPTR EXEC PGM=ICETOOL
//RAWSMF DD DISP=SHR,DSN=UPSK.SMF.DUM1
//TEMPSMF DD DSN=&&TEMPS,SPACE=(CYL,(15,15)),UNIT=SYSDA
//REPORT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(RAWSMF) TO(TEMPSMF) USING(SMFI)
DISPLAY FROM(TEMPSMF) LIST(REPORT) -
TITLE('SMF TYPE-65 RECORDS') DATE TIME PAGE -
HEADER('USERID') ON(67,8,CH) -
HEADER('DSN ') ON(121,44,CH) -
HEADER('ACTION') ON(23,2,CH) -
BLANK
/*
//SMFICNTL DD *
INCLUDE COND=(6,1,BI,EQ,65)
|
But I would to like to know how many records deleted ,Updated and Inserted in a dataset. I know using SMF64NDE,SMF64NIN,SMF64NUP we can grab that information. But what offset value we have to mention in the above Header in TOOL IN statement.
Thanks. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1252 Location: Bamberg, Germany
|
|
|
|
Use DFSORT (ICEMAN) straight forward and save a bit of overhead. ICETOOL might be good in certain cases but what I have seen from my colleague I know why I stick with ICEMAN.
Basically you have two steps here where only one is needed. Try yourself with:
Code: |
INCLUDE COND=(6,1,BI,EQ,X'41')
SORT FIELDS=(date and time)
OUTREC HEADER2=(UId .. DSN .. Action),
BUILD=(requested fields)
END |
The result should be the same. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
- The TS says he wants data from an SMF type 65 record, but the field names he supplies are for an SMF type 64 record. The two records are written for two entirely different purposes and have two entirely different field definitions. Using SMF type 64 fields for a real type 65 record is just going to produce garbage.
- The MVS System Management Facilities (SMF) manual for your z/OS release has detailed descriptions for every field in most SMF records. You can obtain and read this manual as easily as anyone else.
If you are too lazy to do this, assemble this little assembler snippet and work through that listing.
Code: |
SMFREC DSECT
IFASMFR 64
END |
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1252 Location: Bamberg, Germany
|
|
|
|
@Steve: Thanks for the update, didn't notice yet. Might still be too early on this side of the planet. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
One more thing that I forgot to mention. SMF64UIF is not the userid. Extracting the security system userid from SMF data is surprisingly difficult. The manual clearly states this, but does not give any guidelines about retrieving the userid. |
|
Back to top |
|
|
upendrasri
Active User
Joined: 28 Sep 2017 Posts: 121 Location: India
|
|
|
|
Hi All,
Thank you for the details. Am bit new to extracting SMF information.
My query is :- in general using ICETOOL we will grab required information from SMF Records.Using below Header statement
For Ex : To extract SMF65ENM information I have used the below statement .
Code: |
HEADER('DSN ') ON(121,44,CH) -
|
In case if I want to extract SMF64NDE from SMF 64 Records What Statement I have to use?
EX :
Code: |
HEADER('Deleted ') ON(?,4,CH) - ( What offset value I have to use in place of "?")
|
From the manual offset value mentioned as below :
(Offset from beginning of record: 140 + SMF64ESL)
Any suggestion would be great help..
Thanks. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
I spent some time reviewing both the manual and the Assembler listing of the record. There is definitely a problem.
Part of the record may not be there. This is called an "extent" section. It is quite easy to determine if the extent section is present: the contents of SMF64ESL (a 2 byte binary) define the number of bytes in the extent area. You have to add the contents of SMF64ESL to the nominal offset of SMF64STS (the start of the statistics area) and then add the offset of SMF64NDE from the nominal offset of SMF64STS in the record. I know how to do this in Assembler; how you do this in sort I don't know. Obviously it is not a fixed offset, so we can't give you a hard number.
The 140 + SMF64ESL is not what my copy of the manual says. I guess - I'm not going to try to verify this - 140 + the contents of SMF64ESL are the location of SMF64NDE.
Good luck. |
|
Back to top |
|
|
upendrasri
Active User
Joined: 28 Sep 2017 Posts: 121 Location: India
|
|
|
|
Hi Steve,
Thank you for your response..
If possible can you assist me how to do this in Assembler?
Thanks!
Upendra. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Obviously this will never work; not only is the program base register not properly initialized and the DCB is not opened, but my shop does not write type 64 records, so I couldn't test it.
Code: |
SMF64 CSECT
USING *,12
LOOP GET SMFDCB READ A DATA RECORD
LR 2,1 COPY THE RECORD ADDRESS TO REG 2
USING SMFREC,2
CLI SMF64RTY,64 TYPE 64?
BNE LOOP NO
LH 3,SMF64ESL LOAD BYTES IN THE EXTENT AREA
LA 3,SMF64FEX(3) COMPUTE ADDRESS OF STATISTICS AREA
L 4,SMF64NDE-SMF64STS(,3) LOAD NUMBER OF DELETES
* ...
SMFEOF DC 0H'0'
* ...
SMFDCB DCB DSORG=PS,MACRF=GL,DDNAME=SMF,EODAD=SMFEOF,BFTEK=A
SMFREC DSECT
IFASMFR 64
END |
The DCB macro is correctly defined to process dumped SMF data.
A few lines from the Assembler listing.
Code: |
Loc Object Code Addr1 Addr2 Stmt Source Statement
3 LOOP GET SMFDCB
00000C 1821 9 LR 2,1
R:2 00000 10 USING SMFREC,2
00000E 9540 2005 00005 11 CLI SMF64RTY,64
000012 4770 C000 00000 12 BNE LOOP
000016 4830 208A 0008A 13 LH 3,SMF64ESL
00001A 4133 208C 0008C 14 LA 3,SMF64FEX(3)
00001E 5843 0010 00010 15 L 4,SMF64NDE-SMF64STS(3) |
8c+10=9c, which is 140, which (I think) is where the 140 you mentioned came from.
Another thing: SMF64NDE is the number of deletes when the data set was opened. You probably want SMF64DDE. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Oops. I goofed. 8c+10=9c is right, but my elderly brain cells remembered 140 wrong. 8c is 140, not 9c. 9c is 156. |
|
Back to top |
|
|
upendrasri
Active User
Joined: 28 Sep 2017 Posts: 121 Location: India
|
|
|
|
Hi Steve,
Thank you. |
|
Back to top |
|
|
|