TAA Tools
CVTDAYS         CONVERT DAYS                           TAADAUU

The Convert  Days  command converts  a range  of dates  to an  outfile.
The BUSCAL  tool must first be  used to a build a  Business Calendar (a
*USRSPC  object) with the years  that you want to  consider.  Days such
as Sunday, New  Years, Christmas, and  specific dates may be  excluded.
CVTDAYS is  then used to build an  outfile of dates that  have not been
excluded.

The outfile  is always DAYSP which uses a  model file of TAADAUUP and a
format name of DAYSR.

You begin by creating a Business Calendar such as:

             CRTBUSCAL  BUSCAL(xxx)

You then describe the years you  need dates for and the excluded  dates
such as:

             WRKBUSCAL  BUSCAL(xxx) FROMYEAR(nnnn) TOYEAR(nnnn)
                          EXCLUDATE(*SUN *CHRISTMAS +
                          *NEWYEARS 120113)

WRKBUSCAL writes the included dates to the user space.

You can then use CVTDAYS to build an outfile of dates such as:

              CVTDAYS  BUSCAL(xxx) FROMDATE(nnnnnn) +
                        TODATE(nnnnnn) OUTLIB(yyyy)

A  record would  be output  for each  date in  the user  space that  is
within  the From/To dates.   The record would contain  the date in CYMD
format, the date in job  format, the day of the  week such as *MON  and
Monday, and a the digit of the week such as '2'.

CVTDAYS escape messages you can monitor for
-------------------------------------------

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

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

   BUSCAL        The  Business Calendar  (a  *USRSPC object)  that  was
                 created by  CRTBUSCAL.  *LIBL  is the default  for the
                 library  qualifier.    A specific  library  or *CURLIB
                 may also be used.

   FROMDATE      The From  date to  begin  the output  of records  for.
                 Job  format must  be used.   The  date cannot  be less
                 than  the first  date in  the Business Calendar.   The
                 default is  *FIRST  meaning  the  first  date  in  the
                 Business Calendar as generated by WRKBUSCAL.

   TODATE        The To  date to end  the output of  records for.   Job
                 format  must  be used.    The date  cannot  be greater
                 than the  last date  in the  Business Calendar.    The
                 default  is  *LAST  meaning  the   last  date  in  the
                 Business Calendar as generated by WRKBUSCAL.

   OUTLIB        The  library  to  output  the  DAYSP  file  to.    The
                 default  is *LIBL which may only  be used if the DAYSP
                 file may be  found on the library  list.  If the  file
                 does not exist, a library must be named.

   OUTMBR        The member  to be written  to.  The default  is DAYSP.

   REPLACE       A  *YES/*NO parameter for whether  to replace the data
                 in the  outfile.  The  default is  *YES.   *NO may  be
                 specified to add to the existing data.


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

A job date format of *JUL is not supported.

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

The following TAA Tools must be on your system:

     BUSCAL          Business calendar
     CHKOBJ3         Check object 3
     DUPTAADBF       Duplicate TAA data base file
     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVDAT          Retrieve date
     RTVUSRSPC       Retrieve user space
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

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

You must first create a Business Calendar as described earlier.

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

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

   CVTDAYS       *CMD                   TAADAUU       QATTCMD
   TAADAUUC      *PGM       CLP         TAADAUUC      QATTCL
   TAADAUUR      *PGM       RPG         TAADAUUR      QATTRPG
   TAADAUUP      *FILE      PF          TAADAUUP      QATTDDS
					

Added to TAA Productivity tools July 15, 2011


Home Page Up to Top