Oh I get it now - Unix epoch second times are 32 bit *signed* integers. So, they are doing SLR 14,14 prior to dividing by two to truncate at a (signed) 31-bit integer.
0x7FFFFFFF is Jan 19, 2038 (UTC), the latest time that can be represented as a 32-bit signed integer seconds. Kirk Wolf Dovetailed Technologies http://dovetail.com On Tue, Jul 18, 2017 at 9:36 AM, Kirk Wolf <[email protected]> wrote: > Dear ibm-mainers, > > I have a need to do something like this example: > > https://www.ibm.com/support/knowledgecenter/SSLTBW_1.13.0/ > com.ibm.zos.r13.bpxb500/bpxzb5c076.htm > > I'm curious about one part - perhaps I am missing something in the details > of the code. I would appreciate any insight. > > This bit: > > D R14,EPOCST divide by seconds per tod unit > SLR R14,R14 > LA R1,2 > DR R14,R1 > > > I'm curious about something - the EPOCST value they use is actually one half > of > the number of seconds per TOD unit. And so they divide by two. > At first I thought that they were attempting some kind of rounding to the > nearest second, but I don't see how this accomplishes that (or if rounding > would even be desirable). > > > Kirk Wolf > Dovetailed Technologies > > > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
