TAA Tools
RTVCALDAYS      RETRIEVE CALENDAR DAYS                 TAADAUJ

The Retrieve Calendar  Days command returns  a large variable  with the
days of  the year in CYMD  format plus a digit representing  the day of
the  week (Sunday  = 1).   Each entry is  8 bytes.   Selection criteria
exists for  specific days of  the week.   RTVCALDAYS is  useful when  a
list of days is needed.

A typical series of commands would be:

             DCL         &RTNDATE *CHAR LEN(2936)
             DCL         &RTNCNT *DEC LEN(5 0)
              .
             RTVCALDAYS  YEAR(2009) RTNDATE(&RTNDATE) RTNCNT(&RTNCNT)

All days of the  year 2009 would be returned as well  as a count.  Each
entry  would be 8 bytes made  up of the CYMD date  and a one byte value
for the day of  the week (Sunday =  1, ...  Saturday  = 7).  The  first
entry would be '10901015'.

The return  variable must be declared  as *CHAR LEN(2936) to  allow for
366 days plus one blank date - 367 x 8 = 2936.

RTVCALDAYS escape messages you can monitor for
----------------------------------------------

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

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

   YEAR          The  4 digit  year  to return  dates for.    The value
                 must be between 1940 and 2070.

   WEEKDAY       The days of  the week  to be  returned.   *ALL is  the
                 default meaning all  days of the  week.  A list  of up
                 to 7  entries may be  made for the  values *SUN, *MON,
                 *TUE, *WED, *THU, *FRI, or *SAT.

   RTNDATE       The  return dates.   Each entry  will be  8 bytes long
                 made up  of a  date in CYMD  format (7  bytes) plus  a
                 one digit value  for the day of the  week (Sunday = 1,
                 ...  Saturday = 7).

                 This  is  an  optional return  variable  that  if used
                 must be specified as *CHAR  LEN(2936).  There is  room
                 for 366  entries (allowing for  a leap year)  plus one
                 blank date  - 8 x 367 = 2936.   If less than 366 dates
                 are returned, the remaining values will be blank.

   RTNCNT        The number of days that are returned.

                 This is  an  optional  return variable  that  if  used
                 must be specified as *DEC LEN(5 0).

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

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

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

The following TAA Tools must be on your system:

     EXTLST          Extract list
     RTVDAT          Retrieve date
     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
   ------        ----    ---------      ----------    ----------

   RTVCALDAYS    *CMD                   TAADAUJ       QATTCMD
   TAADAUJC      *PGM       CLP         TAADAUJC      QATTCL
					

Added to TAA Productivity tools February 1, 2005


Home Page Up to Top