As stated above, the basic operations of a report program include formatting and printing data from SMF records. Many SMF records have timestamp fields that contain a binary value that represents the time since midnight, in hundredths of seconds. One example is the SMFxxTME field which exists in all SMF record headers and contains a value representing the time when the record was moved into the SMF buffer. Listed below are steps to follow in order to convert any timestamp into time of day format. For more detailed information on SMF record headers see Standard SMF record header.
Note that the DISPLAY and OCCUR operators on the z/OS® DFSORT ICETOOL utility include built in functions to convert the date and time. See z/OS DFSORT: Getting Started.
Example 1: Assume the time value in binary hundredths of a second past midnight is 005C5E00:
005C5E00 = 6053376
6053376/100 = 60533.76
60533.76/3600 = 16.814933333
16 * 3600 * 100 = 5760000
6053376 - 5760000 = 293376
293376/100 = 2933.76
2933.76/60 = 48.896
48 * 60 * 100 = 288000
293376 - 288000 = 5376
5376/100 = 53.76
Therefore, the actual time of day is 16:48:53.76.
Example 2: Assume the time value in binary hundredths of a second past midnight is 005D7740:
005D7740 = 6125376
6125376/100 = 61253.76
61253.76/3600 = 17.014933333
17 * 3600 * 100 = 6120000
6125376 - 6120000 = 5376
5376/100 = 53.76
53.76/60 = 0.896
0 * 60 * 100 = 0
5376 - 0 = 5376
5376/100 = 53.76
Therefore, the actual time of day is 17:00:53.76.
Table 1 and Table 2 list the number of hundredths of a second in each full hour (0-24) and the number of hundredths of a second in each full minute (0-60) respectively. They may be used to make the calculations easier by finding the numbers that are just below the numbers calculated and subtracting them. See the examples following these tables.
Hundredths Of Seconds | Hour |
---|---|
000000 | 0 |
360000 | 1 |
720000 | 2 |
1080000 | 3 |
1440000 | 4 |
1800000 | 5 |
2160000 | 6 |
2520000 | 7 |
2880000 | 8 |
3240000 | 9 |
3600000 | 10 |
3960000 | 11 |
4320000 | 12 |
4680000 | 13 |
5040000 | 14 |
5400000 | 15 |
5760000 | 16 |
6120000 | 17 |
6480000 | 18 |
6840000 | 19 |
7200000 | 20 |
7560000 | 21 |
7920000 | 22 |
8280000 | 23 |
8640000 | 24 |
Hundredths of Seconds | Minutes |
---|---|
000000 | 0 |
006000 | 1 |
012000 | 2 |
018000 | 3 |
024000 | 4 |
030000 | 5 |
036000 | 6 |
042000 | 7 |
048000 | 8 |
054000 | 9 |
060000 | 10 |
066000 | 11 |
072000 | 12 |
078000 | 13 |
084000 | 14 |
090000 | 15 |
096000 | 16 |
102000 | 17 |
108000 | 18 |
114000 | 19 |
120000 | 20 |
126000 | 21 |
132000 | 22 |
138000 | 23 |
144000 | 24 |
150000 | 25 |
156000 | 26 |
162000 | 27 |
168000 | 28 |
174000 | 29 |
180000 | 30 |
186000 | 31 |
192000 | 32 |
198000 | 33 |
204000 | 34 |
210000 | 35 |
216000 | 36 |
222000 | 37 |
228000 | 38 |
234000 | 39 |
240000 | 40 |
246000 | 41 |
252000 | 42 |
258000 | 43 |
264000 | 44 |
270000 | 45 |
276000 | 46 |
282000 | 47 |
288000 | 48 |
294000 | 49 |
300000 | 50 |
306000 | 51 |
312000 | 52 |
318000 | 53 |
324000 | 54 |
330000 | 55 |
336000 | 56 |
342000 | 57 |
348000 | 58 |
354000 | 59 |
360000 | 60 |
Example 3: Assume the time value in binary hundredths of a second past midnight is 005C5E00:
005C5E00 = 6053376
5760000 16
6053376 - 5760000 = 293376
288000 48
293376 - 288000 = 5376
5376/100 = 53.76
Therefore, the actual time of day is 16:48:53.76.