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



                                                                           
             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:48                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
               IBM Mainframe                                               
              Discussion List                                              
             <[EMAIL PROTECTED]                                             
                   .EDU>                                                   
                                                                           
                                                                           




On Wed, 11 Oct 2006 12:22:41 -0500, John P Kalinich <[EMAIL PROTECTED]>
wrote:

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

You win!  I tend to forget about dynamic system symbols except
in TSO / STC JCL.

Might as well use MVSVAR for both then...

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

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