TAA Tools
RTVEOMDAT       RETRIEVE END OF MONTH DATE             TAADATO

The Retrieve  End of Month  Date command returns  the last date  of the
month  in CYYMMDD format.   The  default is  to retrieve the  last date
for  the current month and  year.  A specific  month and/or year may be
used.  A specific end day such as the last Friday may be named.

A typical command would be:

             DCL         &EOMDATE *CHAR LEN(7)
              .
             RTVEOMDAT   EOMDATE(&EOMDATE)

You may request  the date of the  last specific day  of the week.   For
example, to request  the date of the last Friday  of the current month,
you would specify:

             RTVEOMDAT   EOMDATE(&EOMDATE) DAYOFWEEK(*FRI)

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

   EOMDATE       The  return date for the  last day of  the month.  The
                 variable must  be  declared  as  *CHAR  LEN(7).    The
                 format CYYMMDD is returned.

   MONTH         The  month  to  retrieve  the  last  date  for.    The
                 default is *CURRENT.

   YEAR          The year  of the month to retrieve  the date for.  The
                 default is *CURRENT.  A  4 digit year may be  entered.

   DAYOFWEEK     The day  of the week  you want the  end of month  date
                 returned for.   The default  is *LAST which  means the
                 last calendar date of the month.

                 A  special value  *SUN, *MON, *TUE,  *WED, *THU, *FRI,
                 or *SAT may be  entered to return the last day  of the
                 month specified.   For example,  if DAYOFWEEK(*FRI) is
                 specified,  the return date is the  last Friday of the
                 month.

                 A  special  value  *LASTWKDAY  may  be  specified   to
                 return the last  week day of the month.   For example,
                 if  the month  ends on  Wednesday,  the return  is for
                 Wednesday.  If  the week ends  on Saturday or  Sunday,
                 the return is for the prior Friday.

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

The command  uses CVTDAT internally  which restricts the  conversion of
dates from Aug 24, 1928 to May 9, 2071.

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

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

     RTVDAT          Retrieve date

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

None, the tool is ready to use.

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

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

   RTVEOMDAT     *CMD                   TAADATO       QATTCMD
   TAADATOC      *PGM       CLP         TAADATOC      QATTCL
					

Added to TAA Productivity tools May 1, 1997


Home Page Up to Top