IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SMF Specify in the INCLUDE parameter the subtype x,y


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Senior Member


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

PostPosted: Sat Apr 25, 2020 5:51 am
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 25, 2020 8:02 am
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

Senior Member


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

PostPosted: Sat Apr 25, 2020 10:27 am
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

Senior Member


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

PostPosted: Sat Apr 25, 2020 11:36 pm
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
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 29, 2020 9:55 pm
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

Senior Member


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

PostPosted: Thu Apr 30, 2020 12:19 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
Search our Forums:

Back to Top