TAA Tools
RTVDAT4         RETRIEVE DATE 4                        TAADAUO

The Retrieve  Date 4  command is a  subset of  the RTVDAT  TAA command.
RTVDAT4 returns only  the digit of the day of the  week and the week of
the  year.   The intent is  to provide better  performance than RTVDAT.
Both return parameters should be specified for better performance.

If you are repetitively using  RTVDAT (such as in a program  that reads
every record in  a file), RTVDAT4 will provide  better performance than
RTVDAT.

A typical series of commands would be:

             DCL        &DAYOFWEEK *CHAR LEN(1)
             DCL        &WEEKOFYEAR *CHAR LEN(2)
              .
             RTVDAT4    DATE(&DATE) DAYOFWEEK(&DAYOFWEEK) +
                          WEEKOFYEAR(&WEEKOFYEAR)

The  date must be input  in system date format.   The century parameter
defaults to ** meaning the current century.

RTVDAT4 escape messages you can monitor for
-------------------------------------------

None.  Escape  messages from based  on functions will  be re-sent  such
as CPF0555 for an invalid date.

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

   DATE          The date to  be retrieved.  The  special value *SYSDAT
                 may be used to retrieve the current date.

                 If  a specific  date  is entered,  it must  be  in job
                 format.

   CENTURY       The century  of  the date.    ** is  the  default  and
                 means  use  the  century  based  on  the  date.    For
                 example,  if the  date 101509  is entered  (job format
                 of *MDY), a century of 2009 is assumed.

                 Unless  a century is described,  RTVDAT4 uses the same
                 assumptions as  the system  (19 is  assumed for  years
                 40-99  and  00  is   assumed  for  years  00-39).    A
                 different  century may  be  entered between  16 (1600)
                 and 40 (4000).

   DAYOFWEEK     The 1 digit day of  week beginning with Sunday as  day
                 1.   This is an  optional return variable  that should
                 be  specified for better performance  as *CHAR LEN(1).

   WEEKOFYEAR    The 2  character  week of  the  year.   January  1  is
                 always considered  to be  the first  week of the  year
                 regardless of  what day of the week.   The second week
                 of  the  year begins  on the  Sunday following  Jan 1.
                 This is  an optional  return variable  that should  be
                 specified for better performance as *CHAR LEN(2).


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

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

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

The following TAA Tools must be on your system:

     CVTDAT2         Convert date 2
     RTVNEWYEAR      Retrieve new year
     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
   ------        ----    ---------      ----------    ----------

   RTVDAT4       *CMD                   TAADAUO       QATTCMD
   TAADAUOC      *PGM       CLP         TAADAUOC      QATTCL
					

Added to TAA Productivity tools January 1, 2008


Home Page Up to Top