Paul Gilmartin wrote:

> As I see it:
> 
>   The service corresponding to time() is TIME STCK[E],,ZONE=GMT

Except for the difference in epoch and radix, the UNIX time() 
function is conceptually equivalent to z/OS "TIME STCK[E],addr"
or "TIME BIN,addr,ZONE=GMT" or "TIME DEC,addr,ZONE=GMT". 

>   (but the zone is ignored; presumed always GMT?)

In the case of "TIME STCK[E],addr" the value of the TOD clock,
whatever it is set to (presumably UTC or "GMT"), is returned,
and ZONE=whatever is ignored.

It would have been nice if z/OS had implemented the following
function:

         TIME STCK[E],addr,ZONE=LT 

(that is, when STCK[E] is specified, ZONE is _NOT_ ignored) 
But since TIME STCK[E] _does_ ignore ZONE=whatever, you have to
use the code I illustrated to get a "corrected" TOD clock LOCAL 
timestamp value.

>   The service corresponding to gmtime() is STCKCONV 

Nope. STCKCONV is just a formatting conversion service. It does
not "return" anything about the current time or date on the 
system on which it is executed. In z/OS what corresponds to
the UNIX gmtime() function is (at best) "TIME BIN,addr,ZONE=GMT"
or "TIME DEC,addr,ZONE=GMT".

>   I know of no service corresponding to localtime().

In z/OS what corresponds to the UNIX localtime() function is
(at best) "TIME BIN,addr,ZONE=LT" or "TIME DEC,addr,ZONE=LT". 
There is no built-in z/OS service I know of that will return a 
TOD clock-format (STCK or STCKE) value that has been corrected 
to represent the local time. 

--
WB 

----------------------------------------------------------------------
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

Reply via email to