> ...Rolly
>
>Oh, BTW, any one has the time change dates for 2009 - 201x? TIA.

Run the TZDATES EXEC pasted below.

Mike Walter
Hewitt Associates
The opinions expressed herein are mine alone, not my employer's.

/* Prolog; See Epilog for additional information ********************
 * Exec Name     - TZDATES  EXEC                                    *
 * Unit Support  - OSS/VM                                           *
 * Status        - Version 2, Release 1.0                           *
 ********************************************************************/

   address 'COMMAND'
   parse source xos xct xfn xft xfm xcmd xenvir .
   parse upper arg parms 1 operands '(' options ')' parmrest

   If operands='?' then Signal Explain
   parse var operands tz .
   If tz='' then tz='C'
   ltz=length(tz)
   If ltz<>1 then
      Do
        say xfn'; Invalid timezone character, length not "1".' ,
               'Found "'tzc'".'
        say 'For more help, issue:' xfn '?'
        Call Exit 20
      End

   resultfile=xfn 'BOUNDS A'
  'FINIS' resultfile
  'ERASE' resultfile

   Signal ON Error
   Do ix=2007 to 2041        /* What years do we want to cover?      */
      /* As of 2005-09-27, dates beginning in 2042 cause error msg:  */
      /* HCPZPM6706E Invalid date - 2042-mm-dd                       */
      /* There's time for an APAR before then...                     */
      spring=GetSpring(ix)
      fall  =GetFall(ix)
     'EXECIO 1 DISKW' resultfile '0 F 80 (STRING' spring
     'EXECIO 1 DISKW' resultfile '0 F 80 (STRING' fall
   End
  'FINIS' resultfile
   say xfn 'results are now contained in file:' resultfile
Call Exit rc

/********************************************************************/
/*                   Sub-Routines below this point                  */
/********************************************************************/

Exit:
   parse arg exitrc .
   If verify(exitrc,'-0123456789')=0 then Exit exitrc
                                     else Exit 999999


GetSpring:
   parse arg year .
   /* Find 1st Sunday in March, beginning in 2007 per the:           */
   /* "U.S. Government Energy Policy Act of 2005".                   */
   Do dx=year||0301 by 1 for 7 until dow='Sunday'
      dow=date('W',dx,'S')
   End
   dx=dx+7   /* Ooooh, easy date math! Add 14 for 2nd Sunday in March*/
   spring='Timezone_Boundary on' ,
           date('S',dx,'S','-') ,     /* In yyyy-mm-dd fmt           */
          'at 02:00:00 to' tz'DT'     /* Change to Daylight Time     */
Return spring


GetFall:
   parse arg year .
   /* Find 1st Sunday in November beginning in 2007 per the:         */
   /* "U.S. Government Energy Policy Act of 2005".                   */
   Do dx=year||1101 by 1 for 7
      If date('W',dx,'S')<>'Sunday' then Iterate
      Return 'Timezone_Boundary on' ,
              date('S',dx,'S','-') ,  /* In yyyy-mm-dd fmt           */
             'at 02:00:00 to' tz'ST'  /* Change to Standard Time     */
   End
Return


Error:
   say '+++ "ERROR" error routine entered in:' xfn xft xfm', rc='rc
   say '+++ from line:' sigl', which reads:'
   say '+++'sourceline(sigl)
Exit 20


Syntax:
   say '+++ "SYNTAX" error routine entered in:' xfn xft xfm', rc='rc
   say '+++ from line:' sigl', which reads:'
   say '+++'sourceline(sigl)
Call Exit 20


NoValue:
   say '+++ "NoValue" error routine entered in:' xfn xft xfm', rc='rc
   say '+++ from line:' sigl', which reads:'
   say '+++'sourceline(sigl)
   say '+++ Variable with no value is:' condition('Description')
Call Exit 24


Explain:
  'PIPE (NAME Explain)' ,
     '| <' xfn xft xfm ,
     '| INSIDE /ExplainBegin:/ /ExplainEnd:/' ,
     '| PREFACE STRLITERAL /'xfn xft xfm 'help.../' ,
     '| CONSOLE'
   Call Exit 0
/*
ExplainBegin:

Unless changed, TZDATES will produce a file suitable for inclusion in
"SYSTEM CONFIG" on MAINT's CF1, CF2, etc. disks to define the Spring and
Fall Daylight/Standard timezones.



            +-C--------+
>>-TZDATES--+----------+-----------------------------------------------><
            +-timezone-+
            +-?--------+

Where:

timezone
          is the first character of the timezone to preface "DT" or
          "ST".  Default="C", as in "CST" and "CDT".

?
          displays this command help.

ExplainEnd:
*/

/* Epilog ***********************************************************
 * Function      - See "Explain:" subrtn above.                     *
 * Component of  - z/VM Sysprog's Toolbox.                          *
 * Command format- See "Explain:" subrtn above.                     *
 * Called by     - Prepared z/VM Sysprogs.                          *
 * Dependencies  - VM/ESA                                           *
 * Program Lang. - CMS REXX                                         *
 * Date Written  - ?                                                *
 * Author        - Michael R. Walter                                *
 * Changed | By  | Description of Change                            *
 * --------+-----+------------------------------------------------- *
 * 20070301  mrw - Update for 2007 US gov't timezone changes.       *
 *                                                                  *
 ********************************************************************/



The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient is strictly prohibited. All messages 
sent to and from this e-mail address may be monitored as permitted by 
applicable law and regulations to ensure compliance with our internal policies 
and to protect our business. E-mails are not secure and cannot be guaranteed to 
be error free as they can be intercepted, amended, lost or destroyed, or 
contain viruses. You are deemed to have accepted these risks if you communicate 
with us by e-mail. 

Reply via email to