On 1/9/2012 7:28 PM, Paul Gilmartin wrote:
On 1/9/2012 6:56 PM, Steve Comstock wrote:

First: none of the services time, stckconv, convtod produce
or accept as input that is displayable: it all needs some
manipulation.


My reading of the docs is thus (I'm doing this mostly for my
own benefit - it helps me re-think things):

128-bit STCKE value (hmm: that's 16 bytes all by itself:
how does it do that and still return date? never noticed
that before)

It's big enough.

Well, no. The doc says you supply a "16-byte storage
area in which TIME will return the values. The first
two words of this area contain the time of day, or TOD
clock contents, in the requested format. The third
word contains the date in the requested format. Set
the fourth word to zero before issuing TIME."

So, supposedly only the first two words (8 bytes) are
for the time portion. My guess was this is a doc error:
if you request STCKE it fills the 16 bytes and does
not deliver the rest. But experimentation shows the
third word has date as expected in the third word
when I sepcify STCKE.


----------------------------

OK, given the mysterious uncertainty of TIME when you
request STCKE, my best strategy may be:

* Get TIME as STCK
* Use STCKCONV to convert this value into time / date
in this format: hhmmssthmiju00 / yyyymmdd
and format these for messages

at end of run,

* Get TIME as STCK
* Use STCKCONV to convert this value into time / date
in this format: hhmmssthmiju00 / yyyymmdd
and format these for messages

* Subtract the starting STCK value from the ending STCK
value to get an interval (these are just 64 bit
integers, which simplifies other parts of my logic)

* Shift the 64-bit interval value 13 bits to the right
to get number microseconds in the interval

13? 63-51=12

Yes. Experimentation validates that, too. I'm a big
fan of estimate and then trial and error to confirm.

* Convert to packed and edit the result

---------

What do you think?

It's better than what you said before.

Yes. And, it seems to be giving reasonable results.


-- gil



--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-355-2752
http://www.trainersfriend.com

* To get a good Return on your Investment, first make an investment!
  + Training your people is an excellent investment

* Try our tool for calculating your Return On Investment
    for training dollars at
  http://www.trainersfriend.com/ROI/roi.html

Reply via email to