STCK, CICS ABSTIME, and SMF Processor Times
Need to report on fields from SMF records? We have two 4GL products that make it a snap.
Spectrum Writer 4GL -- get easy reports from SMF files and every other file in your shop!
Spectrum SMF Writer -- a very economical 4GL report writer that's just for SMF files!
And both programs also let you export SMF data to comma delimited files for use on PC's.
Best of all, you can download a free trial of either product and start making SMF reports right now!
We also have these tips for working with SMF records
and this sample SMF report made with Spectrum SMF Writer.
Our reporting products support a number of time "data types" that are especially
intended for use with IBM system data. Use these in the TYPE parm of your FIELD
statements to define time fields found in SMF files, CICS transaction and journal logs, General Log Records (GLR), etc.
Here is an explanation of IBM's STCKTIME, ABSTIME and SMF "processor times."
||Fields defined with this type just contain the results of the hardware STCK instruction. It is a 8-byte binary number of "CPU timer units" since midnight GMT 1/1/900. (And, as you know, the STCKADJ option can be used to add or subtract a number of whole hours to the STCK value, to convert the result to local time, if desired.) IBM states that "bit 51" of the 8-byte value corresponds to microseconds (since 00:00 1/1/1900.) Since microseconds is all the precision we support for those fields, we just shift out the low-order 12 bits and use the result as microseconds since 00:00 1/1/1900. (We subtract all the whole days out of the value, leaving just the time since midnight of the target date.) This kind of field would normally contain an actual date-and-timestamp, as opposed to an elapsed time interval.
||Fields defined with this type contain the result of a CICS ABSTIME request (EXEC command). It is an 8-byte packed number of milliseconds (not microseconds) since 00:00 1/1/1900. These timestamps are common in log data written by actual CICS application transactions. These fields could logically contain either a timestamp or an elapsed time interval.
||This is a "binary seconds" time field. Most "processor time" fields
in SMF records are of this type. Other time–of–day and
elapsed time fields can also be stored in this format. You should
specify LENGTH(4) for these time fields. Also use the DEC(2)
parm to indicate that the binary seconds value contains hundredths
of seconds. Here is an example of defining a time field and using
it to select SMF records for a Spectrum Writer report:
FIELD: SMF–TIME DISP(6) TYPE(B–SECS) LENGTH(4) DEC(2)
INCLUDEIF: REC–TYPE = 5 AND (SMF–TIME > 12:59:00 AND < 13:02:30)
Did You Know?
Did you know that Spectrum Writer 4GL handles all of these (and about 30 other) kinds of time fields? Best of all, Spectrum Writer hides the details of the raw data from your users. When you want to select records based on a time, Spectrum Writer automatically performs the necessary conversions for you. You can compare different kinds of time fields directly with each other. Or compare them to your own time literals (HH:MM or HH:MM:SS or HH:MM:SS.nnnn... formats.)
With Spectrum Writer, you can also freely
- sort on these times fields
- use them in logical expressions. Eg: IF MYABSTIME > STCKTIME-START AND < SMFTIME-END
- use them in computational expressions. Eg: MY_CUTOFF_TIME = #INCTIME(STCKTIME1, 60, SECONDS)
- print them in reports (Spectrum Writer reformats them into standard HH:MM:SS format for you)
- export them as standard character time fields for use in PC spreadsheets, etc.
Have some mainframe data that you would like to generate quick reports from? What are you waiting for. Download your free trial now!