On Thu, Feb 3, 2011 at 10:59 AM, Micheal Butz <[email protected]>wrote:

> Edward Jaffes calculation about shifting bits seemed like something I would
> do in Assembler
>
> Regardless if I subtracted a formated T
> TOD which is 26 bytes and just look at the microseconds portion the last 6
> digits wouldn't that be accurate as well
>

The problem is a matter of obtaining sufficient number of digits to get an
accurate answer.  Please consider the case where start time where the last 6
digits of start time is 999999 and the last 6 digits of end time is 000001.
 A difference of just 2 microsecond as Tom pointed out.

However, subtracting just the last 6 digits will result in a negative number
and an inaccurate result.


>
> Sent from my iPhone
>
>
> On Feb 3, 2011, at 1:42 PM, Tom Harper <[email protected]> wrote:
>
>  Michael,
>>
>> Your comment doesn't seem relevant to me. Even if it takes two
>> microseconds, it can span a time boundary which you are not including. More
>> puzzling to me is why don't you want to get your calculation correct?
>>
>> Tom Harper
>>
>> -----Original Message-----
>> From: IBM Mainframe Discussion List [mailto:[email protected]] On
>> Behalf Of Micheal Butz
>> Sent: Thursday, February 03, 2011 12:39 PM
>> To: [email protected]
>> Subject: Re: STCK vs TIMUSED
>>
>> If the code that I marking either Wall or CPU takes longer than 1
>> second there is big trouble
>>
>> Sent from my iPhone
>>
>> On Feb 3, 2011, at 1:21 PM, Sam Siegel <[email protected]> wrote:
>>
>>  On Thu, Feb 3, 2011 at 10:11 AM, Micheal Butz <[email protected]
>>>
>>>> wrote:
>>>>
>>>
>>>  I am doing this in Rexx exec processing a SVC dump after calling
>>>> BLSUXTOD. To convert the double word to a 26 character string I use
>>>> the
>>>> last 6 digits I understand I can bypass this conversion and just do
>>>> the
>>>> subtraction as you said on the double word regardless wouldn't the
>>>> results
>>>> be the same. ???
>>>>
>>>> By using the right most digits there can be a situation where the
>>>> end-time
>>>>
>>> appears to occur prior to the start-time.  Consider the following:
>>>
>>> Start time:   1 999 998
>>> End time:     2 000 003
>>>
>>> When all digits are considered, end-time is greater than start-
>>> time.  When
>>> only 6 digits are considered, start-time appears to be greater than
>>> end-time.
>>>
>>> To get an accurate time enough digits need to be used to ensure that
>>> end-time is greater than start-time when doing the subtractions.
>>>
>>> Using all digits as Ed has suggested pretty much guarantees end-time
>>> will be
>>> great than start-time.
>>>
>>>
>>>
>>>  Sent from my iPhone
>>>>
>>>> On Feb 3, 2011, at 11:57 AM, Edward Jaffe <[email protected]
>>>>
>>>>>
>>>>>  wrote:
>>>>
>>>> On 2/3/2011 8:41 AM, Micheal Butz wrote:
>>>>
>>>>>
>>>>>  I do a substr to get the last 6 digits of the date/time. The
>>>>>> microseconds
>>>>>> portion. And substract.  Value = after - before
>>>>>>
>>>>>>
>>>>> To subtract TOD values, use unsigned binary doubleword arithmetic.
>>>>> If you
>>>>> want resolution to microseconds, shift both doubleword values
>>>>> right by 12
>>>>> bits before subtracting.
>>>>>
>>>>> --
>>>>> Edward E Jaffe
>>>>> Phoenix Software International, Inc
>>>>> 831 Parkview Drive North
>>>>> El Segundo, CA 90245
>>>>> 310-338-0400 x318
>>>>> [email protected]
>>>>> http://www.phoenixsoftware.com/
>>>>>
>>>>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: GET IBM-MAIN INFO
>> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to