This might be handy:

/*--------------------------------------------------------------------*/
/* TIMEZONE - Display either VM SYSTEM CONFIG statements              */
/*            (Timezone_Boundary)                                     */
/*            or VSE ZONEBDY statements for 5 years, starting         */
/*           with the current year                                    */
/*--------------------------------------------------------------------*/
  Trace "O"                                                             
  Parse upper arg OS .                                                  
  Parse source . . !._MyName .                                          
  If OS=" " then                                                        
    OS="VM"                                                             
  else                                                                  
  If WordPos(OS,"VM VSE")==0 then                                       
    Call Error_Exit 28,"Unknown OS '"OS"' specified."                   
                                                                        
  CurDate =Date("S")                                                    
  CurYear =Left(CurDate,4)                                              
  CurMonth=Substr(CurDate,5,2)                                          
  CurDay  =Substr(CurDate,7,2)                                          
  If OS=="VSE" then                                                     
    Do                                                                  
      zPrefix ="SET ZONEBDY,DATE="                                      
      zSuffixS=",CLOCK=02/00/00,xDT"                                    
      zSuffixE=",CLOCK=02/00/00,xST"                                    
    End                                                                 
  else                                                                  
    Do                                                                  
      zPrefix ="Timezone_Boundary on "                                  
      zSuffixS=" at 02:00:00 to xDT"                                    
      zSuffixE=" at 02:00:00 to xST"                                    
    End                                                                 
                                                                        
  Do i=CurYear to CurYear+5                                             
    If i<2007 then                                                      
      Do                                                                
        /*********** Start of DST *************************************/
        zDate=i"0401"                                                   
        zBase=Date("B",zDate,"S")                                       
        zDOW =zBase//7                                                  
        zDelt=6-zDOW                                                    
        zSDST=Date("S",zBase+zDelt,"B")                                 
        /************* End of DST *************************************/
        zDate=i"1101"                                                   
        zBase=Date("B",zDate,"S")                                       
        zDOW =zBase//7                                                  
        zDelt=zDOW+1                                                    
        zEDST=Date("S",zBase-zDelt,"B")                                 
      End                                                               
    else                                                                
      Do                                                                
        /*********** Start of DST *************************************/
        zDate=i"0301"                                                   
        zBase=Date("B",zDate,"S")                                       
        zDOW =zBase//7                                                  
        zDelt=(6-zDOW)+7                                                
        zSDST=Date("S",zBase+zDelt,"B")                                 
        /************* End of DST *************************************/
        zDate=i"1101"                                                   
        zBase=Date("B",zDate,"S")                                       
        zDOW =zBase//7                                                  
        zDelt=6-zDOW                                                    
        zEDST=Date("S",zBase+zDelt,"B")                                 
      End                                                               
/* Say "zDate="zDate "zBase="zBase "zDOW="zDOW "zDelt="zDelt,           
       "zSDST="zSDST "zEDST="zEDST          */                          
    Say zPrefix||Substr(zSDst,5,2)"/"Substr(zSDst,7,2)"/"||,            
        Left(zEDst,4)||zSuffixS                                         
    Say zPrefix||Substr(zEDst,5,2)"/"Substr(zEDst,7,2)"/"||,            
        Left(zEDst,4)||zSuffixE                                         
  End /* i */                                                           
Exit                           
Error_Exit: Procedure expose !.
  Parse arg eRC,eMsg           
  Say !._MyName":" eMsg        
Exit eRC                       

 
Frank M. Ramaekers Jr.
 
 

-----Original Message-----
From: The IBM z/VM Operating System [mailto:[email protected]] On
Behalf Of RPN01
Sent: Thursday, March 03, 2011 10:20 AM
To: [email protected]
Subject: Re: Determining Daylight Savings Time Status

Was that script created before or after they changed when daylight
savings
goes into effect? It may not be correct any more... Be sure to check the
results after you get it working.

-- 
Robert P. Nix          Mayo Foundation        .~.
RO-OC-1-18             200 First Street SW    /V\
507-284-0844           Rochester, MN 55905   /( )\
-----                                        ^^-^^
"In theory, theory and practice are the same, but
 in practice, theory and practice are different."



On 3/3/11 9:42 AM, "Michael Coffin" <[email protected]> wrote:

> Hi Mike,
> 
> That's perfect, Thanks much!  Saved me from re-inventing the wheel.
:)
> 
> -Mike
> 

_____________________________________________________
This message contains information which is privileged and confidential and is 
solely for the use of the
intended recipient. If you are not the intended recipient, be aware that any 
review, disclosure,
copying, distribution, or use of the contents of this message is strictly 
prohibited. If you have
received this in error, please destroy it immediately and notify us at 
[email protected].

Reply via email to