Or this...

/* Rexx */
gmthr = MVSVAR('SYMDEF','HR')
hr = Time('HR')
zone = hr - gmthr
Say 'Local GMT offset is:' zone



                                                                           
             Mark Zelden                                                   
             <[EMAIL PROTECTED]                                             
             CHNA.COM>                                                  To 
             Sent by: IBM              [email protected]                
             Mainframe                                                  cc 
             Discussion List                                               
             <[EMAIL PROTECTED]                                     Subject 
             .EDU>                     Re: TZ in REXX                      
                                                                           
                                                                           
             10/11/2006 12:03                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
               IBM Mainframe                                               
              Discussion List                                              
             <[EMAIL PROTECTED]                                             
                   .EDU>                                                   
                                                                           
                                                                           




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

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