Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SMF Record layout

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 99
Location: India

PostPosted: Mon Dec 16, 2019 11:31 am    Post subject: SMF Record layout
Reply with quote

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
View user's profile Send private message

Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 147
Location: Germany

PostPosted: Tue Dec 17, 2019 1:17 am    Post subject:
Reply with quote

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. icon_biggrin.gif

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 795
Location: The Universe

PostPosted: Tue Dec 17, 2019 6:54 am    Post subject:
Reply with quote

  1. 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.
  2. 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
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 147
Location: Germany

PostPosted: Tue Dec 17, 2019 8:41 am    Post subject:
Reply with quote

@Steve: Thanks for the update, didn't notice yet. Might still be too early on this side of the planet.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 795
Location: The Universe

PostPosted: Tue Dec 17, 2019 11:38 am    Post subject:
Reply with quote

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
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 99
Location: India

PostPosted: Tue Dec 17, 2019 1:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 795
Location: The Universe

PostPosted: Tue Dec 17, 2019 8:50 pm    Post subject:
Reply with quote

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
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 99
Location: India

PostPosted: Tue Dec 17, 2019 8:58 pm    Post subject:
Reply with quote

Hi Steve,

Thank you for your response..

If possible can you assist me how to do this in Assembler?

Thanks!
Upendra.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 795
Location: The Universe

PostPosted: Wed Dec 18, 2019 1:10 am    Post subject:
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 795
Location: The Universe

PostPosted: Wed Dec 18, 2019 5:46 am    Post subject:
Reply with quote

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
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 99
Location: India

PostPosted: Thu Dec 19, 2019 5:04 pm    Post subject:
Reply with quote

Hi Steve,

Thank you.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare Two datasets and get the 1st ... ArunkumarGanesan DFSORT/ICETOOL 4 Fri Mar 27, 2020 2:00 am
No new posts Include Group record based on detail ... guptae DFSORT/ICETOOL 11 Thu Mar 12, 2020 1:54 pm
No new posts IDMS record copybook Susanta IDMS/ADSO 2 Mon Feb 24, 2020 8:55 pm
No new posts Sort to construct single record from ... Deepti_R SYNCSORT 3 Wed Nov 13, 2019 12:14 am
No new posts Need help in parsing record in VBA file guptae DFSORT/ICETOOL 4 Fri Oct 11, 2019 2:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us