Article View: comp.lang.asm370
Article #669Re: Time conversion
From: Phil Howard KA9WGN
Date: Fri, 12 Apr 1991 05:21
Date: Fri, 12 Apr 1991 05:21
40 lines
2662 bytes
2662 bytes
ZPRM%AACC@CUNYVM.CUNY.EDU (ZPRM000) writes: >We are suprised with all the great info about the TOD conversion. >We are trying one of them now. >We wrote a program that runs under CICS that gives a pageable >screen showing termids, virt addresses, real addresses and user >operator info. We want to show the time the term was last active >but cant seem to find any fields in the CICS that contain this time. >There is a field in the SNT that is supose to be a time stamp >in STCK format but its only 4 bytes. Any ideas? The upper 4 bytes of the STCK timestamp is effectively stepped every 1.048576 seconds. It would be SIMPLEST to just take the upper 4 bytes of the STCK timestamp and apply the conversions by filling in the lower 4 bytes with 0's. HOWEVER it is POSSIBLE they MIGHT be taking the full STCK and shifting it to the right by 12 bits then dividing by one million exactly to come up with an integer that is effectively incremented every 1.000000 seconds. The reason to do that is that it would appear to SOME people that it is easy to make date calculations on something that is stepped every 1.000000 seconds instead of something that is stepped every 1.048576 seconds. It is in fact a slight bit faster to make such conversions, but not worth doing the extra work to save a timestamp in this form. My recommendation is to save timestamps in STCK format or part thereof in binary. Remember if you must optimize for speed, optimize that which is executed the most. But timestamps are not worth optmizing much either way. Anyway you better check and see what method they are using. Try assuming the values are just the upper half of the STCK and see what results you get. If the answers are not "really close" then it is probably the other method. -- /***************************************************************************\ / Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu \ \ Lietuva laisva -- Brivu Latviju -- Eesti vabaks / \***************************************************************************/
Technical Details
Message-ID:
<9104120555.AA07368@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!dog.ee.lbl.gov!ucbvax!UX1.CSO.UIUC.EDU!philShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!dog.ee.lbl.gov!ucbvax!UX1.CSO.UIUC.EDU!phil
From: phil@UX1.CSO.UIUC.EDU (Phil Howard KA9WGN)
Newsgroups: comp.lang.asm370
Subject: Re: Time conversion
Message-ID: <9104120555.AA07368@ucbvax.Berkeley.EDU>
Date: 12 Apr 91 05:21:51 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: IBM 370 Assembly Programming Discussion List
<ASM370@OHSTVMA.BITNET>
Distribution: inet
Organization: The Internet
Lines: 40