Portal | 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 Specify in the INCLUDE parameter the subtype x,y

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

New User


Joined: 25 Apr 2020
Posts: 3
Location: Brasil

PostPosted: Sat Apr 25, 2020 5:32 am    Post subject: SMF Specify in the INCLUDE parameter the subtype x,y
Reply with quote

Hello,

I'm new here on the forum, sorry if I make a mistake.

Could you please help me collect SMF record 42, subtype 09?
I imagine the icetool include should look something like this:

Code:
INCLUDE COND = (6.1, BI, EQ, 42, AND, ??, ??, BI, EQ, 09)



But I don't find the coordinates to specify the subtype in the manual, so I would like to know where I can find ... any suggestions?

This is my jcl:
Code:

//SMFLIST   EXEC PGM=ICETOOL                                           
 //TOOLMSG   DD SYSOUT=*                                                 
 //DFMSG     DD SYSOUT=*                                                 
 //SSMSG     DD SYSOUT=*                                                 
 //SMFINDD   DD DSN=AP.TEMPR.UCEMVS2.REGALL.OIWK75V,DISP=SHR             
 //TEMP#     DD DSN=&&TEMPV,                                             
 //          SPACE=(CYL,(500,50)),UNIT=SYSDA,BLKSIZE=32760               
 //PRINT     DD DSN=AP.TEMPR.TON.SMF,DISP=(,CATLG,DELETE),UNIT=SYSDA,   
 //          SPACE=(CYL,(500,50)),DCB=(LRECL=255,BLKSIZE=0,RECFM=FB)     
 //TOOLIN    DD *                                                       
  COPY    FROM(SMFINDD) TO(TEMP#) USING(SMFI)                           
  OCCURS  FROM(TEMP#) LIST(PRINT) -                                     
          PAGE -                                                         
          TITLE('SMF TYPE42 RECORDS')-                                   
          HEADER('TIME') ON(7,4,TM1,E'99:99:99') - C'HH:MM:SS'           
          HEADER('DATE') ON(11,4,DT3,E'9999-999') - C'YYY-DDD'           
          HEADER('S42JOBN') ON(05,8,CH) -                               
          HEADER('S42ASTPN') ON(29,01,BI) -                             
          HEADER('S42FLAGS') ON(30,01,BI) -                               
          BLANK                                                         
 //SMFICNTL  DD *                                                       
  INCLUDE COND=(6,1,BI,EQ,42)    :?:

Coded for you
Back to top
View user's profile Send private message

Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 311
Location: Bamberg, Germany

PostPosted: Sat Apr 25, 2020 5:51 am    Post subject:
Reply with quote

First of all, please make use of Code Tags when presenting data.

According to the manual SMF42STY is at position 22, length 2.

Untested:
Code:
INCLUDE COND=(6,1,BI,EQ,42,AND,23,2,BI,EQ,9)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8561
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 25, 2020 8:02 am    Post subject: Reply to: SMF Specify in the INCLUDE parameter the subtype x,y
Reply with quote

Something is off somewhere. I've included the start of SMF Header/Self-Defining Section for type 42 in the SMF manual:
Code:
Offsets    Name    Length    Format    Description
0    0    SMF42RCL    2    binary    Record length. This field and the next field (total of four bytes) form the record descriptor word (RDW). See Standard SMF record header for a detailed description.
2    2    SMF42SGD    2    binary    Segment descriptor (see record length field). This is zero, if the record is not spanned.
4    4    SMF42FLG    1    binary    System indicator flags

Bit
    Meaning when set
0
    Subsystem identification follows system identification.
1
    Subtypes are used
2
    Reserved
3-6
    Version indicators*
7
    Reserved.

*See Standard SMF record header for a detailed description.
5    5    SMF42RTY    1    binary    Record type 42 (X'2A').
6    6    SMF42TME    4    binary    Time since midnight, in hundredths of a second, when the record was moved into the SMF buffer.
10    A    SMF42DTE    4    packed    Date when the record was moved into the SMF buffer, in the form 0cyydddF. See Standard SMF record header for a detailed description.
14    E    SMF42SID    4    EBCDIC    System identification (from the SID parameter).
18    12    SMF42SSI    4    EBCDIC    Subsystem identification.
22    16    SMF42STY    2    binary    Record subtype.
The record type is at offset 5, not 6 -- and offset 5 would be byte 2 in the record. The subtype is at offset 22, which is byte 19 in the record. I don't recall offhand if ICETOOL works on offsets or record bytes but in either case, you need to adjust your positions.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 311
Location: Bamberg, Germany

PostPosted: Sat Apr 25, 2020 10:27 am    Post subject:
Reply with quote

Positions for RTY, TME, DTE and STY are correct for DFSORT. However, those look definitely fishy to me:
Code:
HEADER('S42JOBN') ON(05,8,CH) -
HEADER('S42ASTPN') ON(29,01,BI) -
HEADER('S42FLAGS') ON(30,01,BI) -
Back to top
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 311
Location: Bamberg, Germany

PostPosted: Sat Apr 25, 2020 11:36 pm    Post subject:
Reply with quote

Try this at your shop, it will produce a very simple list of Jobs that have failed. You can elaborate from there and add some bells and whistles.
Code:
//SMFLIST   EXEC PGM=ICEMAN                                 
//SORTIN    DD DISP=SHR,DSN=AP.TEMPR.UCEMVS2.REGALL.OIWK75V 
//SYSOUT    DD SYSOUT=*                                     
//SORTOUT   DD SYSOUT=*                                     
//SYSIN     DD *                                             
  INCLUDE COND=(6,1,BI,EQ,42,AND,23,2,BI,EQ,9)               
  SORT FIELDS=(11,4,BI,A,7,4,BI,A)                           
  OUTFIL FNAMES(SORTOUT),                                   
    REMOVECC,VTOF,                                           
    BUILD=(11,4,DT3,EDIT=(TTTT/TTT),X,         SMF42DTE     
           7,4,TM1,EDIT=(TT:TT:TT),X,          SMF42TME     
           97,8,X,                             S42JOBN       
           121,1,BI,M11,LENGTH=3,X,            S42ASTPN     
           122,1,CHANGE=(1,                    S42FLAGS     
                           B'100.....',C'B',          *     
                           B'010.....',C'D',          *     
                           B'001.....',C'E'),C'37',X, *     
           174,6,X,                            S42VOLSR     
           130,44)                             S42DSNME     
  END                                                       
/*
Back to top
View user's profile Send private message
Antonio A Negrelli

New User


Joined: 25 Apr 2020
Posts: 3
Location: Brasil

PostPosted: Wed Apr 29, 2020 8:55 pm    Post subject:
Reply with quote

Thanks for your help Joerg! I believe
I should review the smf table to improve understanding ...
I ran the jcl, and the size error message appeared ...
ICE218A 1 18 BYTE VARIABLE RECORD IS SHORTER THAN 24 BYTE MINIMUM

I tried to see it in another post and found something like this to be added:
INREC IFTHEN = (WHEN = (1,2, BI, LT, 24), OVERLAY = (24: X))

... but I think I couldn't adjust it.

The post I saw was this:
"Receiving ICE218A message for shorter length record"
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8561
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 29, 2020 9:55 pm    Post subject: Reply to: SMF Specify in the INCLUDE parameter the subtype x,y
Reply with quote

Quote:
18 BYTE VARIABLE RECORD IS SHORTER THAN 24 BYTE MINIMUM
The header and trailer records (type 2 and 3) for SMF are 18 bytes long (unless you start using the new subtypes for record type 2 in which case the record length can be up to 612 bytes), so when you specify
Code:
  INCLUDE COND=(6,1,BI,EQ,42,AND,23,2,BI,EQ,9) 
you're attempting to use bytes of the record that don't exist.
Quote:
... but I think I couldn't adjust it.
Why do you think this?
Back to top
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 311
Location: Bamberg, Germany

PostPosted: Thu Apr 30, 2020 12:19 am    Post subject:
Reply with quote

@Antonio: Please retry my snippet again with adding the following to the SYSIN:
Code:
OPTION VLSCMP,NOSOLRF
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 Required Date Format in Include Sort ... vivky_vivek DFSORT/ICETOOL 6 Fri Aug 14, 2020 6:52 am
No new posts New Parameter should be added to the ... spizen556 CLIST & REXX 30 Fri Apr 03, 2020 5:37 pm
No new posts Include Group record based on detail ... guptae DFSORT/ICETOOL 11 Thu Mar 12, 2020 1:54 pm
No new posts Include current & next records if... Manny Rizal DFSORT/ICETOOL 22 Mon Dec 30, 2019 9:14 am
No new posts How to include header and some detail... AllyDick DFSORT/ICETOOL 2 Sun Dec 08, 2019 10:19 pm

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