TAA Tools
RTVSOMDAT       RETRIEVE START OF MONTH DATE           TAADATP

The Retrieve  Start of Month  Date command retrieves  the date for  the
first specified  day of the month.  For  example, you can determine the
date  of  the first  Monday  of the  month.   The  date is  returned in
CYYMMDD format.

A typical command would be:

            DCL          &SOMDATE *CHAR LEN(7)
             .
            RTVSOMDAT    SOMDATE(&SOMDATE) DAYOFWEEK(*FRI)

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

   SOMDATE       The start  of  month  date  that is  returned  in  the
                 format CYYMMDD.  It must be declared as *CHAR LEN(7)

   DAYOFWEEK     The  day of  the  week  to be  used  to determine  the
                 start  date.  It must be  entered as *SUN, *MON, *TUE,
                 *WED, *THU, *FRI, or *SAT.

                 A special  value exists  for *FSTWKDAY  to return  the
                 first week  day of  the month.   For  example, if  the
                 month   begins  on   Wednesday,  the  return   is  for
                 Wednesday.    If  the  week  begins  on  Saturday   or
                 Sunday, the return is for the following Monday.

   MONTH         The  month  to  retrieve  the  last  date  for.    The
                 default is  *CURRENT.  *NEXT  many be entered  for the
                 next   calendar  month.    If   a  specific  month  is
                 entered, it must  be a value  from 01 to  12.  If  the
                 month  is  Jan -  Sept,  it  must  be entered  with  a
                 leading 0 such as 02.

   YEAR          The  year of the month to retrieve  the date for.  The
                 default is *CURRENT.  If  a specific year is used,  it
                 must be entered as 4 digits such as 2001.

                 The value must be between 1940 and 2039.

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

The command  uses CVTDAT internally  which restricts the  conversion of
dates from 1940 to 2039.

Because  the command returns a  variable, it may  only be used  in a CL
program.

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

The following TAA Tools must be on your system:

     RTVDAT          Retrieve date

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

None, the tool is ready to use.

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

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

   RTVSOMDAT     *CMD                   TAADATP       QATTCMD
   TAADATPC      *PGM       CLP         TAADATPC      QATTCL
					

Added to TAA Productivity tools June 1, 1997


Home Page Up to Top