On Wed, 11 Oct 2006 09:01:26 -0700, Edward Jaffe
<[EMAIL PROTECTED]> wrote:

>Can someone tell me the easiest way to get the time zone offset (hours)
>in a REXX exec? I realize I can access the CVT and do some math. I just
>thought there might be a "cleaner" way. Perhaps via SYSCALL?
>

I don't know of any.  SYSCALL would use what was set in the TZ var
in z/OS Unix, right?

Anyway... I use this:

/* rexx */                                       
numeric digits 10                                
cvt        = c2d(storage(10,4))                  
chkbyte    = storage(d2x(cvt + 304),1)           
cvttz      = storage(d2x(cvt + 304),4)           
If bitand(chkbyte,'80'x) = '80'x then ,          
  cvttz    = c2d(cvttz,4)                        
Else cvttz = c2d(cvttz)                          
cvttz      = cvttz * 1.048576 / 3600             
cvttz      = format(cvttz,2,0)                   
say 'Local GMT offset is:' cvttz                 

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group
mailto: [EMAIL PROTECTED]
z/OS and OS390 expert at http://searchDataCenter.com/ateExperts/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

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