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

