To get the number of days, divide the microsecond interval by 86,400,000,000 (a 
64-bit number; divide by a million and then by 86,400 if you are more 
comfortable with that). The quotient is the number of whole days in excess of 
your hours, minutes and seconds. (You know how to remember about z division? 
quOtient in the Odd register; rEmainder in the Even register.)

Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Janet Graff
Sent: Friday, June 12, 2015 7:40 AM
To: [email protected]
Subject: Re: STCK question

As these things go, I have found new uses for my little routine.  It's strong 
enough to find the elapsed time for larger numbers than I intended.  So much 
so, I thought I'd add a function to show the elapsed time since the beginning 
of my started task.  The time is working wonderfully but when I cross the more 
than a day boundary I'd like to display the number of days since the start of 
the program.

I wound up using the 

STCK-STCK          difference in times since the start of the started task
+ 1972/01/01     add in base STCK time to get a STCK value again
STCKCONV           convert that to DATE=YYYYMMDD TIME=DEC
ED                       make it character based

sequence so I have

1972/01/03 23:15:06.238744

What I'd like is

2 days 23:15:06.238744

I can calculate the date difference by hand (in C based off of the character 
representation of the date) of course.  Unless someone knows of a nifty method 
to get the elapsed number of days from the data that I have?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to