TAA Tools
RTVDAT3         RETRIEVE DATE 3                        TAADATS

The Retrieve Date  3 command allows you  to request a date such  as the
first  Monday in  October of  a specific  year  and returns  the actual
date  in CYMD format.   A specific week  or the last  week of the month
may be specified.  The command is helpful when scheduling events.

A typical command would be:

             DCL          &RTNDATE *CHAR LEN(7)
              .
             RTVDAT3      DAY(*MON) MONTH(*OCT) RELDAYMTH(1) +
                            RTNDATE(&RTNDATE)

This would return the date in CYMD format for the current year.

Numbers may be used in place of the * values such as:

             RTVDAT3      DAY(1) MONTH(10) ...

To determine the  date of  the last Friday  of July  in the year  2009,
you would specify:

             RTVDAT3      DAY(*FRI) MONTH(*JUL) RELDAYMTH(*LAST) +
                            YEAR('2009') RTNDATE(&RTNDATE)

Years 1940 - 2039 are supported.

If RELDAYMTH(5)  is specified, there may not  be a 5th day  of the week
for  the specified day.  If  so, TAA9891 is sent  as an escape message.

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

   DAY           The day  of  the  week requested.    A number  1  -  7
                 (Sunday =  1) may be  specified or the  special values
                 *SUN ...  *SAT.

   MONTH         The  month requested.   A  number 01  - 12  (January =
                 01) may be  specified or the  special values *JAN  ...
                 *DEC.

   RELDAYMTH     The relative  day of  the month.   A  value 1  - 5  or
                 *LAST  may be  specified.   For example,  to determine
                 the  second  Monday  of  the  month,  specify  2.   To
                 determine  the  last  Monday  of  the  month,  specify
                 *LAST.

                 If RELDAYMTH(5)  is specified, there may not  be a 5th
                 day  of  the  week  for the  specified  day.    If so,
                 TAA9891 is sent as an escape message.

   YEAR          The year requested.   The default is *CURRENT  meaning
                 the  current  year.     Years  1940  -   2039  may  be
                 specified.

   RTNDATE       The  return  date  in the  format  CYMD.   The  return
                 variable must be specified as *CHAR LEN(7).

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

Only the years 1940 - 2039 are supported.

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

The following TAA Tools must be on your system:

     RTVDAT          Retrieve date
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   RTVDAT3       *CMD                   TAADATS       QATTCMD
   TAADATSC      *PGM       CLP         TAADATSC      QATTCL
					

Added to TAA Productivity tools March 1, 1998


Home Page Up to Top