In a recent note, John P Kalinich said:
> Date: Wed, 11 Oct 2006 12:55:31 -0500
>
> Actually, this might even work better...
>
> /* Rexx */
> hr = MVSVAR('SYMDEF','HR')
> lhr = MVSVAR('SYMDEF','LHR')
> day = MVSVAR('SYMDEF','DAY')
> lday = MVSVAR('SYMDEF','LDAY')
> If lday < day Then
> hr = hr + 24
> If lday > day Then
> lhr = lhr + 24
> zone = lhr - hr
> Say 'Local GMT offset is:' zone
>
And, if you're particularly A-R, you must account for the
cases in which the date changes between any two of the
function calls above. Such bugs as might result are
excruciatingly difficult to recreate. Redesign left as an
exercise for the student. Ditto for fractional-hour offsets,
eastern hemisphere, International Date Line, etc.
It's terrible design not to have a single function call
that returns all the components of the time, based on a
single reading of the hardware clock. Imagine:
parse value MVSVAR('SYMDEF', 'HR LHR DAY LDAY') ,
with HR LHR DAY LDAY .
Yah, I suspect I know the design constraints placed on
System Symbols. Nope, I don't particularly respect them.
Even use of such System Symbols in started task JCL
could result in a 23 hour 59 minute 59 second error in
the displayed time (or is that taken care of somehow?)
-- gil
--
StorageTek
INFORMATION made POWERFUL
----------------------------------------------------------------------
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