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

Need help with ICETOOL Time masks please


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
timburkart

New User


Joined: 17 Mar 2007
Posts: 29
Location: USA

PostPosted: Sun Apr 01, 2007 2:28 am
Reply with quote

I using ICETOOL for an SMF report but am having difficulty getting the CPU TIME fields to display. The DATE and TIME fields print fine with the DT1 and TM1 mask respectively but I cannot get the remaining fields to print. I thought TC1 would be the right mask but I get 00:00:00.

Can someone help me please?

Regards,
Tim

HEADER('DATE') ON(1,4,DT1,E'9999-99-99') -
HEADER('TIME') ON(5,4,TM1,E'99:99:99') -
HEADER('TASK CPU TIME') ON(13,8,TC1,E'99:99:99') -
HEADER('DATABASE CPU TIME') ON(17,8,TC1,E'99:99:99') -
HEADER('NETWORK CPU TIME') ON(25,8,TC,E'99:99:99') -
HEADER('OTHER CPU TIME') ON(33,8,TC1,E'99:99:99') -

Here are the field definitions:

1 SMFHDATE PL4 DATE RECORD WAS WRITTEN (0CYYDDDF)
5 SMFHTIME BL4 TIME RECORD WAS WRITTEN (TIME BIN)
9 SMO2CLCP CL8 CLIENT TASK CPU TIME (TOD FORMAT)
17 SMO2DBCP CL8 DATABASE CPU TIME USED OUT OF TOTAL CPU TIME (SMO2CLCP)
25 SMO2NTCP CL8 NETWORK CPU TIME USED OUT OF TOTAL CPU TIME (SMO2CLCP)
33 SMO2OHCP CL8 OTHER CPU TIME USED OUT OF TOTAL CPU TIME (SMO2CLCP).
THIS IS CPUTIME NOT ASSOCIATED WITH ANY OTHER OPERATION.

Record snippet in hex mode:
Code:
   ?  ?       !?                      ?
000800B200000055000000000000001400000041
178F02FA000016A5000000000000041000001295

Vendor manual explanation of its UNITS OF TIME format:
Quote:
SMF data is expressed in time-of-day (TOD) format, which is an unsigned 64-bit fixed point number where bit 51 is the equivalent to 1 microsecond. The TOD clock is a binary counter where the bit positions of the clock are numbered 0 to 63. This corresponds to the bit positions of a 64-bit unsigned binary integer.

In the basic form, the TOD clock is incremented by adding a 1 in bit position 51 every microsecond. In models with a higher or lower resolution, a different bit position is incremented at a frequency where the rate of advancing the clock is the same as if a one were added in bit position 51 every microsecond. The resolution of the TOD clock is such that the incrementing rate is comparable to the instruction execution rate of the model.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 01, 2007 4:58 am
Reply with quote

Hello Tim,

Don't know if this will help, but thought a little too much is better than a little not enough icon_smile.gif http://www-03.ibm.com/developerworks/blogs/page/MartinPacker?entry=dfsort_processing_smf_records

Also, have the latest PTFs been applied to DFSORT on your system? Lots of the neatest, newest is not available until the PTFs are applied.

Have a good one and even if i can't help, i can commiserate. . .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Apr 02, 2007 2:50 am
Reply with quote

TC1 is the DFSORT format for displaying a proper TOD value as hhmmss. You have 13,8 instead of 9,8 and TC instead of TC1 for 25,8. If you clean this up to:

Code:

HEADER('DATE') ON(1,4,DT1,E'9999-99-99') -             
HEADER('TIME') ON(5,4,TM1,E'99:99:99') -               
HEADER('TASK CPU TIME') ON(9,8,TC1,E'99:99:99') -       
HEADER('DATABASE CPU TIME') ON(17,8,TC1,E'99:99:99') - 
HEADER('NETWORK CPU TIME') ON(25,8,TC1,E'99:99:99') -   
HEADER('OTHER CPU TIME') ON(33,8,TC1,E'99:99:99')       


all of the CPU times do come out to 00:00:00. So either these are not valid TOD values or all of the values are actually less than the minimum value displayed by TC1.

Interestingly, if I use TE4, E'99:99:99.99', which displays more precision, rather than TC1, I get the following CPU times:

Code:

00:00:01.07         00:00:00.00        00:00:00.01      00:00:01.05 
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Apr 02, 2007 11:04 pm
Reply with quote

Tim,

For closure, I posted the following to your question about this in ibm-main:

Quote:
Despite the vendor documentation above, they state that these
particular time fields are in MSEC8 format.

MSEC8 FORMAT
00000000 2647041A = 0.156784 sec
METHOD 1
1) TREAT THIS AS BINARY INT CONVERT TO DECIMAL
2) / 4096 = NUMBER OF MICROSECONDS (6 DIGITS OVER TO GET SECONDS)
METHOD 2
1) SHIFT RIGHT 12 BITS or 3 hex digits (THIS IS DIVIDING BY 4096)
2) CONVERT AS BINARY INT TO DECIMAL (6 DIGITS OVER TO GET SECONDS)

Is there a way to do this conversion with ICETOOL/DFSort?


You can do the conversion with DFSORT by dividing by 4096. Then you can use an edit mask to convert to something like dddd.dddddd. For example:

Code:

   OUTFIL ...,
      BUILD=(...,13,8,BI,DIV,+4096,EDIT=(TTTT.TTTTTT),...)   


You could do that in one pass if you use DFSORT's OUTFIL reporting features.

If you want to do it with DFSORT's ICETOOL DISPLAY, you can do a COPY with an INREC statement to divide each value by +4096. Then edit each resulting value, e.g. something like:

Code:

...
//TOOLIN DD *
COPY FROM(IN) TO(T1) USING(CTL1)
DISPLAY ...
  HEADER('TASK CPU TIME') ON(c,10,ZD,E'9999.999999') -
...
//CTL1CNTL DD *
  INREC BUILD=(...,c:13,8,BI,DIV,+4096,TO=ZD,LENGTH=10,...)
/*
Back to top
View user's profile Send private message
timburkart

New User


Joined: 17 Mar 2007
Posts: 29
Location: USA

PostPosted: Tue Apr 03, 2007 2:28 am
Reply with quote

Thank you very much Frank!! I got it to work using ICETOOL.

regards,

tim
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Apr 03, 2007 2:59 am
Reply with quote

Tim,

Good. Glad I could help.
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 To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts C Compile time time stamps Java & MQSeries 10
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top