RTVDSTDAT       RETRIEVE DST DATE                      TAATINO

 The Retrieve  DST (Daylight  Savings Time)  Date command retrieves  the
 actual dates  that daylight savings time will begin  and end for a Time
 Zone  Description  in a  specific year.   The  system support  for Time
 Zone Descriptions does  not include  the actual dates  of change.   The
 TAA9893 escape  message is sent if  the Time Zone  Description does not
 support daylight savings time.

 Special  values may be entered for some  Time Zone descriptions such as
 *PACIFIC.

 A typical series of commands would be:

              DCL        &DSTSTRDAT *CHAR LEN(7)
              DCL        &DSTENDDAT *CHAR LEN(7)
               .
              RTVDSTDAT  DSTSTRDAT(&DSTSTRDAT) DSTENDDAT(&DSTENDDAT)

 The default  is to  use the  value for  the current  time zone  (System
 value QTIMZON) and  the current year.   The dates would be  returned in
 CYYMMDD format.

 RTVDSTDAT escape messages you can monitor for
 ---------------------------------------------

       TAA9893    The Time Zone does not support DST

 Escape messages from based on functions will be re-sent.

 RTVDSTDAT Command parameters                          *CMD
 ----------------------------

    TIMZON        The  time zone to  retrieve information for.   It must
                  be one  of the  special values  or a  name of  a  time
                  zone as seen with WRKTIMZON.

                  The  following special  values  exist along  with  the
                  time zone that will be used:

                    *SYSVAL      The QTIMZON system value
                    *GMT         Q0000GMT
                    *BRITISH     Q0000GMT2
                    *UTC         Q0000UTC
                    *ATLANTIC    QN0400AST2
                    *EASTERN     QN0500EST3
                    *CENTRAL     QN0600CST2
                    *MOUNTAIN    QN0700MST2
                    *PHOENIX     QN0800PST3
                    *PACIFIC     QN0800PST2

                    *ALASKA      QN0900AST2
                    *HAWAIIAN    QN1000HAS2
                    *NEWZEALAN   QP1200NZS3
                    *EAUSTRAL    QP1000AES3
                    *CAUSTRAL    QP0930ACS3
                    *WAUSTRAL    QP0800AWS3
                    *JAPAN       QP0900JST
                    *KOREA       QP0900KST
                    *BEIJING     QP0800BST
                    *MOSCOW      QP0300MSK
                    *INDIA       QP0530IST
                    *EEUROPE     QP0200EET3
                    *CEUROPE     QP0100CET4

    YEAR          The  year of the  information to  be returned.   *CURR
                  is  the default for the current  year.  The value must
                  be in a range of 2009 - 2039.

    DSTSTRDAT     The start date  of daylight savings  time.  The  value
                  will  be returned  in a  CYYMMDD format.   This  is an
                  optional   return  variable  that  if   used  must  be
                  specified as *CHAR LEN(7).

    DSTENDDAT     The end  date of  daylight savings  time.   The  value
                  will be  returned in  a CYYMMDD  format.   This is  an
                  optional   return  variable  that  if   used  must  be
                  specified as *CHAR LEN(7).

    DSTSTRSPE     The start date  of daylight savings  time spelled  out
                  such as  Mar 14,  2010.   This is  an optional  return
                  variable  that  if used  must  be  specified as  *CHAR
                  LEN(12).

    DSTENDSPE     The  end  date of  daylight  savings time  spelled out
                  such  Nov  7,  2010.    This  is  an  optional  return
                  variable  that  if used  must  be  specified as  *CHAR
                  LEN(12).

    DSTSTRDAY     The  start day  of daylight  savings time.   The value
                  to be returned  will be *SUN,  *MON ...   *SAT.   This
                  is an  optional return variable  that if used  must be
                  specified as *CHAR LEN(4).

    DSTENDDAY     The  end day of daylight  savings time.   The value to
                  be returned will  be *SUN, *MON  ...  *SAT.   This  is
                  an  optional return  variable  that  if used  must  be
                  specified as *CHAR LEN(4).

    DSTSTRTIM     The start  time of daylight  savings time.   The value
                  to  be returned  will be in  the HHMMSS  format.  This
                  is an optional  return variable that  if used must  be
                  specified as *CHAR LEN(6).

    DSTENDTIM     The end time  of daylight savings time.   The value to
                  be  returned will  be in the  HHMMSS format.   This is
                  an optional  return  variable  that if  used  must  be
                  specified as *CHAR LEN(6).

    DSTSHIFT      The number  of minutes that  local time  moves forward
                  when  daylight savings  time starts or  moves backward
                  when  daylight  savings  time   ends.    This  is   an
                  optional  return  variable   that  if  used   must  be
                  specified as *DEC LEN(5 0).

    OFFSET        The  UTC offset  in  time (not  considering  DST) from
                  Greenwich  mean  time.   This  is  an  optional return
                  variable that  if  used  must be  specified  as  *CHAR
                  LEN(10).

    RTNSTDNAM     The  full  name  of  the  of the  standard  Time  Zone
                  Description.    This is  an  optional  return variable
                  that if used must be specified as *CHAR LEN(50).

    RTNTIMZON     The return name  of the Time  Zone description.   This
                  may  be  helpful if  TIMZOND(*SYSVAL)  was  specified.
                  This  is  an  optional return  variable  that  if used
                  must be specified as *CHAR LEN(10).

    RTNTIMZONA    The  return  abbreviated   name  of   the  Time   Zone
                  description.   This  is  an optional  return  variable
                  that if used must be specified as *CHAR LEN(10).

    RTNTIMZOND    The  return full  name of  the Time  Zone Description.
                  This  is  an  optional return  variable  that  if used
                  must be specified as *CHAR LEN(50).

    RTNYEAR       The return year.   This may be helpful  if YEAR(*CURR)
                  was specified.   This  is an optional  return variable
                  that if used must be specified as *CHAR LEN(4).


 Restrictions
 ------------

 Because  RTVDSTDAT returns variables,  the command may only  be used in
 a CL program.

 Prerequisites
 -------------

 The following TAA Tools must be on your system:

      RTVDAT          Retrieve date
      RTVEOMDAT       Retrieve end of month date
      RTVSOMDAT       Retrieve start of month date
      RTVTIMZOND      Retrieve time zone description
      SNDESCINF       Send escape information
      SNDESCMSG       Send escape message

 Implementation
 --------------

 None, the tool is ready to use.

 Objects used by the tool
 ------------------------

    Object        Type    Attribute      Src member    Src file
    ------        ----    ---------      ----------    ----------

    RTVDSTDAT     *CMD                   TAATINO       QATTCMD
    TAATINOC      *PGM       CLP         TAATINOC      QATTCL

Added to TAA Productivity Tools January 15, 2010


Home Page

Powered by AS/400Powered by AS/400 Last modified on July 15, 2010 © 1995, 2010 - Jim Sloan, Inc.