BUSCAL          BUSINESS CALENDAR                      TAADAUI

 The Business Calendar  tool provides a  solution for the  question 'How
 many  working days  exist  between 2  dates?'.   A  'business calendar'
 object  (a *USRSPC) must be created.   The definition of 'working days'
 is made  by  use of  the  WRKBUSCAL command  which  allows days  to  be
 'excluded'  such   as  'Saturday',  'Christmas',   or  specific  dates.
 WRKBUSCAL  then builds a  list of the 'excluded'  and 'included' dates.

 In  the  documentation  and  commands,  'working  days'  are  known  as
 'include days' and 'non-working days' are known as 'exclude days'.

 The following commands are provided:

    CRTBUSCAL     Creates a 'business calendar' (*USRSPC).

    DLTBUSCAL     Deletes a 'business calendar'.

    WRKBUSCAL     Defines  the days  to  be excluded  and generates  the
                  exclude   and   include   dates   in   the   'business
                  calendar'.

    DSPBUSCAL     Displays the  attributes and  details of  a  'business
                  calendar'  object  including the  number  of  'include
                  days' between two dates.

    RTVBUSCALA    Retrieves  the  attributes  of a  'business  calendar'
                  into CL variables.

    CLCBUSCAL     Calculates  for either  'include' or  'exclude' days a
                  count  of  days   and  optionally  the   actual  dates
                  between two dates into CL variables.

    CLCBUSCAL2    Calculates  a   count  of  'include'   days  and  time
                  between  two dates and  times.  It  returns values for
                  the  differences   in   days,  hours,   minutes,   and
                  seconds.

    DSPENDDAY     Displays  the  last day  based  on  a start  date  and
                  number  of  days  for  either  'include' or  'exclude'
                  days.  DSPENDDAY answers  the question 'What day  will
                  a project finish  on if it requires n  working days?'.

    CLCENDDAY     Calculates  the  end day  based  on a  start  date and
                  number  of  days  for  either  'include'  or 'exclude'
                  days.   This provides the  DSPENDDAY information  into
                  a variable for use in a CL program.

    DSPSTRDAY     Displays  the start  day based  on an  end date  and a
                  number  of  days  for  either  'include'  or 'exclude'
                  days.  DSPSTRDAY answers  the question 'What day  must
                  a project start  on if the end date and  the number of
                  working days are known?'.

    CLCSTRDAY     Calculates  the start day based  on an end  date and a
                  number of  days  for  either  'include'  or  'exclude'
                  days.   This provides  the DSPSTRDAY information  into
                  a variable for use in a CL program.

    CHKBUSCALD    Checks a  date to see if it is  either an 'include' or
                  'exclude' date.

 Getting started with the BUSCAL tool
 ------------------------------------

   **   Use  CRTBUSCAL  to  create  a 'business  calendar'  object  in a
        specific library.  In  the following example BUSCAL1  is created
        in library ABC.

            CRTBUSCAL     BUSCAL(ABC/BUSCAL1) TEXT(...)

        A *USRSPC object of approximately 95,000 bytes is created.

   **   Use WRKBUSCAL  to define the range  of years and the  days to be
        excluded.     In   the  following  example,   Saturday,  Sunday,
        Christmas, and 11/02/09  are excluded for a  year range of  2008
        - 2009.

            WRKBUSCAL     BUSCAL(ABC/BUSCAL1)
                            FROMYEAR(2008) TOYEAR(2009)
                            EXCLUDATE(*SAT *SUN *CHRISTMAS 11/02/09)

        WRKBUSCAL generates the  'exclude dates' for the  range of years
        specified.   It  then  generates all  of the  possible  dates as
        potential 'include  dates' for  the same  years.   The  'exclude
        dates' are then  read and the corresponding 'include  dates' are
        deleted.    The two  sets  of  dates are  then  placed into  the
        'business  calendar' object.   The  values you  entered (such as
        *SAT) for  the  EXCLUDATE parameter  are  also placed  into  the
        'business calendar' object.

        A day  of week value such  as *SAT generates  multiple dates per
        year.   A value such as *CHRISTMAS  generates one date per year.
        A value such as  02/02/09 generates a  single date.  When  using
        a specific date, the  year of the date must  be within the range
        of FROMYEAR/TOYEAR.

   **   Use WRKBUSCAL again as:

            WRKBUSCAL     BUSCAL(ABC/BUSCAL1)

        and  press Enter.  The  values you specified  are extracted from
        the 'business calendar' object  and placed on  the command by  a
        prompt override program.

        You can modify any  of the values such as adding  *NEWYEARS as a
        new  date to  be excluded  (the command  prompter allows  you to
        add  more entries  by placing  a +  sign in  one of the  list of
        date values and pressing Enter).

        When you change  any value, WRKBUSCAL re-calculates  the exclude
        and include  dates and  updates the 'business  calendar' object.

   **   Use DSPBUSCAL to see what exists:

            DSPBUSCAL    BUSCAL(ABC/BUSCAL1)

        The  values  you  specified  are  re-displayed  along  with  the
        actual dates to be excluded and included.

   **   DSPBUSCAL may  also be  used  to determine  the number  of  days
        between two dates such as:

            DSPBUSCAL    BUSCAL(ABC/BUSCAL1) FROMDATE(*TODAY)
                            TODATE(12/31/09)

        The number of  'exclude' and 'include' dates  are described (the
        last line of the listing has the 'include' count).

        Note the  number of days displayed is  not a strict subtraction.
        For example, if you  have excluded Saturday  and Sunday and  the
        *MDY dates used are  FROMDATE = 11/02/09 and TODATE  = 11/12/09,
        there  are 9  working  days.   This includes  both  11/02/09 and
        11/12/09 and excludes Saturday 11/07/09 and Sunday 11/08/09.

   **   The  CLCBUSCAL command returns  a count and  an optional list of
        either  'exclude'  or   'include'  dates   within  a  range   of
        specified dates.   Because  CLCBUSCAL returns variables,  it may
        only be used in a CL program.

        A typical command would be:

             CLCBUSCAL    BUSCAL(ABC/BUSCAL1) TYPE(*INCLUDE)
                            FROMDATE(*TODAY) TODATE(12/31/09)
                            AVLCNT(&AVLCNT)

        A  list  of up  to  1400 dates  may  be returned  with  a single
        command.  The number  of dates available  may exceed 1400.   See
        the CLCBUSCAL command for how to process more than 1400.

   **   The RTVBUSCALA  command returns  the attributes  of a  'business
        calendar'  object including the  total available  count for both
        'exclude' and  'include' dates  within the  'business  calendar'
        object.   Because RTVBUSCALA returns  variables, it may  only be
        used in a CL program.

   **   The  DSPENDDAY command  displays the  end  day for  the question
        'What  is the end  day if the  start date and  number of days is
        known?'.  A typical command would be:

             DSPENDDAY    BUSCAL(ABC/BUSCAL1) NBROFDAYS(nn)
                            TYPE(*INCLUDE) FROMDATE(*TODAY)

        A  listing would  be  displayed  describing the  calculated  end
        date.

   **   The CLCENDDAY  command provides the same  function as DSPENDDAY,
        but  returns the end date  to a CL variable  for CL program use.

   **   The DSPSTRDAY command  displays the start  day for the  question
        'What is  the start day  if the end date  and number of  days is
        known?'.  A typical command would be:

             DSPSTRDAY    BUSCAL(ABC/BUSCAL1) NBROFDAYS(nn)
                            TYPE(*INCLUDE) FROMDATE(*TODAY)

        A  listing would  be displayed  describing the  calculated start
        date.

   **   The CLCSTRDAY command provides  the same function as  DSPSTRDAY,
        but returns  the  start date  to a  CL variable  for CL  program
        use.

   **   The  DLTBUSCAL command deletes  the 'business  calendar' object.
        It will only delete a *USRSPC created by CRTBUSCAL.

   **   The  CHKBUSCALD command will check a  date that it is either and
        'include' or 'exclude'  date.   The default is  to check for  an
        'include' date.

             CHKBUSCALD   BUSCAL(ABC/BUSCAL1) DATE(nnnnnn)

        An  escape message is  issued if  the date  in not  an 'include'
        date.

 BUSCAL *USRSPC layout
 ---------------------

 The  CRTBUSCAL  command creates  a user  space  of about  95,000 bytes.
 The DSPUSRSPC TAA Tool  may be used to display  the contents of a  user
 space.   There is  no requirement  to directly  access the  information
 from the  user space as the supplied commands will  do it for you.  The
 user space layout is:

     Header
     ------

         1  -    10     **BUSCAL**
        12  -    15     From year
        17  -    20     To year
        22  -    28     Last change date
        31  -    40     User who made last change
        45  -    49     Available number of excludes
        51  -    55     Available number of includes
        61  -    65     Number of specified date command values

     WRKBUSCAL exclude date values
     -----------------------------

       101  -  3700     WRKBUSCAL command dates (used by pmt ovr)

                           Each day is 12 bytes
                           12 x 300 = 3600

     Exclude dates
     -------------

     10001  - 46000     Each entry is 10 bytes for 10 years max

                         10 x 10 x 366 = 36,600
                         Each entry is made up of

                           1 -  7  7 byte CYMD date

                           8 -  8  1 byte sequencing code - only
                                     used internally

                           9 -  9  1 byte code for special day
                                     See TAADAUIR4 for the arrays
                                       that allow translation

                          10 - 10  1 byte code for day of week
                                     See TAADAUIR4 for the arrays
                                       that allow translation

     Include dates
     -------------

     50001  - 86,600   Each entry is 10 bytes for 10 years max

                         10 x 10 x 366 = 36,600
                         Each entry is made up of

                           1 -  7  7 byte CYMD date

                           8 -  8  1 byte code for day of week
                                     See TAADAUIR4 for the arrays
                                       that allow translation

                           9 - 10  2 blanks

 BUSCAL escape messages you can monitor for
 ------------------------------------------

 Most of the  supplied commands  do not issue  escape messages  intended
 to be monitored for.   Escape messages from based on  functions will be
 re-sent.

 Both  the CLCENDDAY  and  CLCSTRDAY command  will issue  TAA9891  if an
 insufficient  number  of  days  exist with  the  data  available.   For
 example,    if   CLCENDDAY    is    used   with    NBROFDAYS(30)    and
 FROMDATE(12/12/09)  and only  the  year 2009  is  within the  'business
 calendar',  there cannot be  30 include days  of data  in the 'business
 calendar'.

 The CHKBUSCALD command will  issued TAA9891 if the  date is not  within
 the supported  calendar years  provided by the  calendar.   The TAA9892
 message  is  issued  if  the  date  and  type  requested  (*INCLUDE  or
 *EXCLUDE) is not valid.

 CRTBUSCAL Command                                     *CMD
 -----------------

    BUSCAL        The qualified name of  the 'business calendar'  object
                  (*USRSPC)  to be  created.   The  library defaults  to
                  *CURLIB.

    TEXT          The  text  description to  be  used.   The  default is
                  *BLANK meaning the text description will be blank.

 DLTBUSCAL Command                                     *CMD
 -----------------

    BUSCAL        The  qualified name of  the 'business calendar' object
                  (*USRSPC) to  be  deleted.   The library  defaults  to
                  *LIBL.   A  specific library  or *CURLIB  may  also be
                  entered.

                  The   *USRSPC  object   must  have  been   created  by
                  CRTBUSCAL.

 WRKBUSCAL Command                                     *CMD
 -----------------

    BUSCAL        The qualified name of  the 'business calendar'  object
                  (*USRSPC) to  be worked  with.   The library  defaults
                  to *LIBL.

                  A specific library or *CURLIB may also be entered.

                  The   *USRSPC  object   must  have  been   created  by
                  CRTBUSCAL.

                  After validating the  input parameters, the  'business
                  calendar' object  is locked  to an  *EXCL state  until
                  the updates are completed to the user space.

    FROMYEAR      The  year to  begin  with  for both  the  excluded and
                  included  dates.   The year  must be  between 1940 and
                  2039.

    TOYEAR        The  year  to end  with  for  both  the  excluded  and
                  included  dates.  The  year must  be between  1940 and
                  2039  and  must  be  greater  than  or  equal  to  the
                  FROMYEAR.

    EXCLUDATE     A list  of up to  300 dates  or special  values to  be
                  excluded.   The default  is *NONE for  no dates  to be
                  excluded.

                  An  actual date  may  be entered  in job  format  or a
                  special value.   The  days of  the week  such as  *SAT
                  and  *SUN may  be  entered  or  special days  such  as
                  *NEWYEARS  and  *CHRISTMAS.   The  *THANKSGV value  is
                  the  US  Thanksgiving Day  (always  a Thursday).   The
                  *THANKSGV2 value  is the day  after Thanksgiving  Day.
                  See the command prompt for the special values.

                  A day  of week value  such as *SAT  generates multiple
                  dates   per  year.     A  value   such  as  *CHRISTMAS
                  generates  one  date  per  year.    A  value  such  as
                  02/02/07  generates  a  single  date.   When  using  a
                  specific  date, the  year of the  date must  be within
                  the range of FROMYEAR/TOYEAR.

                  The  'include'  dates  are  automatically   determined
                  based on the  FROMYEAR/TOYEAR values and  the excluded
                  dates.

 DSPBUSCAL Command                                     *CMD
 -----------------

    BUSCAL        The qualified  name of the  'business calendar' object
                  (*USRSPC)   to  display  the   attributes  and  detail
                  information for.  The library defaults to *LIBL.

                  A specific library or *CURLIB may also be entered.

    FROMDATE      The date  to begin  displaying from.   The default  is
                  *START  meaning  at the  starting  date  found in  the
                  'business calendar'.

                  A  specific  date  in  job  format  or  *TODAY may  be
                  specified.

    TODATE        The date  to  end displaying  from.   The  default  is
                  *END meaning  the ending date  found in  the 'business
                  calendar'.

                  A  specific  date  in  job  format  or *TODAY  may  be
                  specified.

    OUTPUT        How to output the results.

                  * is the default  to display the  spooled file if  the
                  command is  entered interactively.   The spooled  file
                  is deleted after it is displayed.

                  If  the  command  is entered  in  batch  or *PRINT  is
                  specified,  the spooled  file is  output and retained.

 RTVBUSCALA Command                                    *CMD
 ------------------

    BUSCAL        The qualified name  of the 'business calendar'  object
                  (*USRSPC) to  retrieve from.  The  library defaults to
                  *LIBL.

                  A specific library or *CURLIB may also be entered.

    RTNLIB        The  library  where  the  'business  calendar'  object
                  exists.  This is an  optional return variable that  if
                  used must be specified as *CHAR LEN(10).

    FROMYEAR      The 'From  Year' as specified  on WRKBUSCAL.   This is
                  an  optional  return  variable that  if  used  must be
                  specified as *CHAR LEN(4).

    TOYEAR        The 'To Year' as specified  on WRKBUSCAL.  This is  an
                  optional  return  variable   that  if  used   must  be
                  specified as *CHAR LEN(4).

    LSTCHGDATE    The last  change date when  using WRKBUSCAL.   This is
                  an  optional  return  variable that  if  used  must be
                  specified as  *CHAR LEN(7).   The  date will  be in  a
                  CYMD format.

    LSTCHGUSR     The  user who  made the  last change  using WRKBUSCAL.
                  This  is  an  optional return  variable  that  if used
                  must be specified as *CHAR LEN(10).

    TOTEXC        The total  number  of  exclude  dates.    This  is  an
                  optional  return   variable  that  if  used   must  be
                  specified as *DEC LEN(5 0).

                  Note  that   this  is  the  total  number  within  the
                  'business calendar'  object.   Use  the  DSPBUSCAL  or
                  CLCBUSCAL  commands  to  determine  how  many  exclude
                  days exist between two dates.

    TOTINC        The  total  number  of  include  dates.   This  is  an
                  optional   return  variable  that   if  used  must  be
                  specified as *DEC LEN(5 0).

                  Note  that  this  is  the  total  number   within  the
                  'business  calendar' object.    Use  the DSPBUSCAL  or
                  CLCBUSCAL  commands  to  determine  how  many  include
                  days exist between two dates.

    CMDDATCNT     The number of date  values specified on the  WRKBUSCAL
                  command.  Each  special value counts as  one date even
                  though   multiple   exclude   dates   may  have   been
                  generated  (such  as  *SAT).    This  is  an  optional
                  return  variable that  if used  must  be specified  as
                  *DEC LEN(5 0).

    CMDDATES      The  list of  date values  specified on  the WRKBUSCAL
                  command.   Each special value  counts as one date even
                  though   multiple  exclude   dates   may   have   been
                  generated.   This is an optional  return variable that
                  if  used must be specified as  *CHAR LEN(3600).  Up to
                  300 dates will be returned.   Each entry has a  length
                  of 12.   Blanks will exist at  the end of the  list if
                  there are no more remaining entries.

    OWNER         The  owner of  the 'business  calendar' object.   This
                  is an optional  return variable that  if used must  be
                  specified as *CHAR LEN(10).

    TEXT          The  text  description  of   the  'business  calendar'
                  object.   This is an optional return  variable that if
                  used must be specified as *CHAR LEN(50).

 CLCBUSCAL Command                                     *CMD
 -----------------

    BUSCAL        The  qualified name of  the 'business calendar' object
                  (*USRSPC)  to   be  retrieved  from.     The   library
                  defaults to *LIBL.

                  A specific library or *CURLIB may also be entered.

    TYPE          The type of dates to retrieve.

                  *INCLUDE  is   the  default   for  the  dates   to  be
                  'included'.

                  *EXCLUDE  may   be  specified  for  the  dates  to  be
                  'excluded'.

    FROMDATE      The date to  begin retrieving  from.   The default  is
                  *START  meaning at  the  starting  date found  in  the
                  'business calendar'.

                  A  specific  date  in  job  format  or *TODAY  may  be
                  specified.

    TODATE        The date  to  end retrieving  from.   The  default  is
                  *END  meaning  at   the  ending  date  found   in  the
                  'business calendar'.

                  A  specific  date  in  job  format or  *TODAY  may  be
                  specified.

    RTNLIB        The  library  where  the  'business  calendar'  object
                  exists.  This is  an optional return variable  that if
                  used must be specified as *CHAR LEN(10).

    AVLCNT        The  available  number of  dates  that  exist for  the
                  type  between the  FROMDATE/TODATE  range.   Note that
                  in  some  cases  this  number  may  be   greater  than
                  RTNCNT.  This  is an optional return  variable that if
                  used must be specified as *DEC LEN(5 0).

                  If  both the FROMDATE  and TODATE dates  have the same
                  value, a count  of 1  will be  returned (assuming  the
                  date is within the TYPE specified).

    RTNCNT        The  number of  dates  that will  be  returned in  the
                  DATES   parameter.    This   is  an   optional  return
                  variable  that  if  used  must  be  specified  as *DEC
                  LEN(5 0).

                  If you  do not want  the actual  dates from the  DATES
                  parameter, use the AVLCNT parameter.

                  It  is possible  that  the number  of  dates that  are
                  available   will  exceed   the  number  that   can  be
                  retrieved with a  single use of  CLCBUSCAL.  There  is
                  a maximum  of 1400 dates returned  on a single  use of
                  CLCBUSCAL.    You can  compare the  RTNCNT  value with
                  the AVLCNT  value to  determine if  more dates  exist.
                  If  the  available  count  value  exceeds  the  RTNCNT
                  value, see  the NXTDATE parameter for  a discussion of
                  how to access the additional dates.

    DATES         A  list of up to 1400  dates in CYMD format (each date
                  is 7  bytes) found  for the  TYPE and  FROMDATE/TODATE
                  parameters.    This  is  an optional  return  variable
                  that if used must be specified as *CHAR LEN(9800).

                  It  is possible that  the number of dates  that can be
                  returned will exceed  the 1400  date limit.   See  the
                  NXTDATE parameter for  a discussion of how  to process
                  additional dates.

                  If  less that 1400  dates are  returned, the remaining
                  entries will be blank.

    NXTDATE       The next date that is  available that will not fit  in
                  the date 1400 limit.   The field will be  blank if all
                  available   dates   fit   based   on  the   TYPE   and
                  FROMDATE/TODATE parameters.

                  If  a date exists, it will be  in job format.  You may
                  specify  the  value  in  the  FROMDATE   parameter  on
                  another  use  of  CLCBUSCAL.   Using  NXTDATE,  it  is
                  possible  to retrieve  all dates  that are  within the
                  'business  calendar'  object   by  multiple  uses   of
                  CLCBUSCAL.   If a range of  10 years is  requested, it
                  is  possible  that  either  list  will  contain up  to
                  3,660 dates.

 CLCBUSCAL2 Command                                    *CMD
 ------------------

    BUSCAL        The qualified name of  the 'business calendar'  object
                  (*USRSPC)  to   be  retrieved   from.    The   library
                  defaults to *LIBL.

                  A specific library or *CURLIB may also be entered.

    BGNDAT        The  beginning date to  consider in  job format.   The
                  combination  of the BGNDAT/BGNTIM  values must be less
                  than  or equal  to  the combination  of  ENDDAT/ENDTIM
                  values.

    BGNTIM        The beginning  time to consider in  HHMMSS format with
                  or without job time separators.

    ENDDAT        The ending date to consider in job format.

    ENDTIM        The  ending time to consider in  HHMMSS format with or
                  without job time separators.

    RTNDAY        The number  of days  between the  begin date/time  and
                  the  end  date/time  based on  the  business  calendar
                  object  referenced.    Note  this  is  the  number  of
                  working days  minus 1.   Therefore  if the  begin  and
                  end date are the same, the RTNDAY will be 0.

                  A variable name  is required and must be  specified as
                  *DEC LEN(5 0).

    RTNHOUR       The  number  of  hours  difference between  the  begin
                  date/time  and the end  date/time.  The  value will be
                  between 0 and 23.

                  A variable name is  required and must be specified  as
                  *DEC LEN(2 0).

    RTNMINUTE     The  number of  minutes difference  between the  begin
                  date/time  and the end  date/time.  The  value will be
                  between 0 and 59.

                  A variable name is required  and must be specified  as
                  *DEC LEN(2 0).

    RTNSECOND     The  number of  seconds difference  between the  begin
                  date/time  and the end  date/time.  The  value will be
                  between 0 and 59.

                  A variable name is required  and must be specified  as
                  *DEC LEN(2 0).

    MSGOPTION     A *YES/*NO value  for whether messages should  be sent
                  describing  the  input and  return  values.   This  is
                  intended as a debugging option.

                  *NO is the default to not send messages.

                  *YES may be specified to send messages.

 DSPENDDAY Command                                     *CMD
 -----------------

    BUSCAL        The  qualified name of  the 'business calendar' object
                  (*USRSPC) to  display from.   The library defaults  to
                  *LIBL.

                  A specific library or *CURLIB may also be entered.

    NBROFDAYS     The number  of days  to add to  the FROMDATE  value to
                  determine   the   end   date   (the   TYPE   is   also
                  considered).

    TYPE          The type of dates to retrieve.

                  *INCLUDE  is  the   default  for   the  dates  to   be
                  'included'.

                  *EXCLUDE  may  be  specified  for   the  dates  to  be
                  'excluded'.

    FROMDATE      The  date to  begin displaying from.   The  default is
                  *TODAY meaning todays date.

                  A specific date  in job format  or *START (meaning  at
                  the  first date  in  the 'business  calendar'  object)
                  may be specified.

    PRTDATES      Whether to list the detail dates.

                  *NO is the default.  Only the end date is listed.

                  *YES may be specified to list each date.

    OUTPUT        How to output the results.

                  * is  the default to  display the spooled  file if the
                  command  is entered  interactively.   The spooled file
                  is deleted after it is displayed.

                  If the  command  is  entered  in batch  or  *PRINT  is
                  specified,  the spooled file  is output  and retained.

 CLCENDDAY Command                                     *CMD
 -----------------

    BUSCAL        The  qualified name of  the 'business calendar' object
                  (*USRSPC) to retrieve from.   The library defaults  to
                  *LIBL.

                  A specific library or *CURLIB may also be entered.

    NBROFDAYS     The number  of days  to add to  the FROMDATE  value to
                  determine   the   end   date   (the   TYPE   is   also
                  considered).

    TYPE          The type of dates to retrieve.

                  *INCLUDE  is  the   default  for  the   dates  to   be
                  'included'.

                  *EXCLUDE  may  be  specified  for   the  dates  to  be
                  'excluded'.

    FROMDATE      The  date to begin  retrieving from.   The  default is
                  *TODAY meaning the current date.

                  A  specific date in  job format or  *START (meaning at
                  the  the  first   date  in  the   'business  calendar'
                  object) may be specified.

    ENDDAT        The end  date to  be returned.   The variable  will be
                  in  *CYMD  format  and  must  be  specified  as  *CHAR
                  LEN(7).

 DSPSTRDAY Command                                     *CMD
 -----------------

    BUSCAL        The qualified name of  the 'business calendar'  object
                  (*USRSPC) to  display from.   The library  defaults to
                  *LIBL.

                  A specific library or *CURLIB may also be entered.

    NBROFDAYS     The  number  of  days  to  subtract  from the  ENDDATE
                  value to determine  the start date  (the TYPE is  also
                  considered).

    ENDDATE       The end date to  be used in providing the  start date.

                  A specific date in job format must be specified.

    TYPE          The type of dates to retrieve.

                  *INCLUDE   is  the  default   for  the  dates   to  be
                  'included'.

                  *EXCLUDE   may  be  specified  for  the  dates  to  be
                  'excluded'.

    PRTDATES      Whether to list the detail dates.

                  *NO is the default.  Only the end date is listed.

                  *YES may be specified to list each date.

    OUTPUT        How to output the results.

                  * is the  default to display  the spooled file if  the
                  command  is entered interactively.   The  spooled file
                  is deleted after it is displayed.

                  If  the  command  is entered  in  batch  or  *PRINT is
                  specified, the spooled  file is  output and  retained.

 CLCSTRDAY Command                                     *CMD
 -----------------

    BUSCAL        The qualified  name of the 'business  calendar' object
                  (*USRSPC)  to retrieve from.   The library defaults to
                  *LIBL.

                  A specific library or *CURLIB may also be entered.

    NBROFDAYS     The number  of  days  to  subtract  from  the  ENDDATE
                  value to  determine the start  date (the TYPE  is also
                  considered).

    ENDDATE       The end  date to be  used to help  determine the start
                  date.

                  A specific date in job format must be specified.

    TYPE          The type of dates to retrieve.

                  *INCLUDE   is  the   default  for  the   dates  to  be
                  'included'.

                  *EXCLUDE  may  be  specified  for  the   dates  to  be
                  'excluded'.

    STRDATE       The start date  to be returned.  The  variable will be
                  in  *CYMD  format  and  must  be  specified  as  *CHAR
                  LEN(7).

 CHKBUSCALD Command                                    *CMD
 ------------------

    BUSCAL        The qualified name of  the 'business calendar'  object
                  (*USRSPC)  to   be  retrieved   from.     The  library
                  defaults to *LIBL.

    DATE          The date to be checked (enter in job format).

                  TAA9891  is sent as an  escape message if  the date is
                  not within the calendar supported years.

                  TAA9892 is  sent  as an  escape  message if  the  date
                  does not meet the TYPE specified.

    TYPE          Either check  for an  'include' date  or an  'exclude'
                  date.    *INCLUDE is  the  default.   *EXCLUDE  may be
                  specified.

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

 None.

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

 The following TAA Tools must be on your system:

      CHGUSRSPC       Change user space
      CRTUSRSPC       Create user space
      DUPTAADBF       Duplicate TAA data base file
      EDTVAR          Edit variable
      EXTLST2         Extract list 2
      RTVDAT          Retrieve date
      RTVCALDAYS      Retrieve calendar days
      RTVEOMDAT       Retrieve end of month date
      RTVHOLIDAY      Retrieve holiday
      RTVSOMDAT       Retrieve start of month date
      RTVSYSVAL3      Retrieve system value 3
      RTVUSRSPC       Retrieve user space
      SNDCOMPMSG      Send completion message
      SNDESCINF       Send escape information
      SNDESCMSG       Send escape message
      SNDSTSMSG       Send status message

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

 None, the tool is ready to use.

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

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

    WRKBUSCAL     *CMD                   TAADAUI       QATTCMD
    CRTBUSCAL     *CMD                   TAADAUI2      QATTCMD
    DLTBUSCAL     *CMD                   TAADAUI3      QATTCMD
    DSPBUSCAL     *CMD                   TAADAUI4      QATTCMD
    RTVBUSCALA    *CMD                   TAADAUI5      QATTCMD
    CLCBUSCAL     *CMD                   TAADAUI6      QATTCMD
    DSPENDDAY     *CMD                   TAADAUI7      QATTCMD
    CLCENDDAY     *CMD                   TAADAUI8      QATTCMD
    DSPSTRDAY     *CMD                   TAADAUI9      QATTCMD
    CLCSTRDAY     *CMD                   TAADAUI10     QATTCMD
    CLCBUSCAL2    *CMD                   TAADAUI11     QATTCMD
    CHKBUSCALD    *CMD                   TAADAUI12     QATTCMD
    TAADAUIC      *PGM       CLP         TAADAUIC      QATTCL
    TAADAUIC2     *PGM       CLP         TAADAUIC2     QATTCL
    TAADAUIC3     *PGM       CLP         TAADAUIC3     QATTCL
    TAADAUIC4     *PGM       CLP         TAADAUIC4     QATTCL
    TAADAUIC5     *PGM       CLP         TAADAUIC5     QATTCL
    TAADAUIC6     *PGM       CLP         TAADAUIC6     QATTCL
    TAADAUIC7     *PGM       CLP         TAADAUIC7     QATTCL
    TAADAUIC8     *PGM       CLP         TAADAUIC8     QATTCL
    TAADAUIC9     *PGM       CLP         TAADAUIC9     QATTCL
    TAADAUIC10    *PGM       CLP         TAADAUIC10    QATTCL
    TAADAUIC11    *PGM       CLP         TAADAUIC11    QATTCL
    TAADAUIC12    *PGM       CLP         TAADAUIC12    QATTCL
    TAADAUIC21    *PGM       CLP         TAADAUIC21    QATTCL
    TAADAUIC22    *PGM       CLP         TAADAUIC22    QATTCL
    TAADAUIC23    *PGM       CLP         TAADAUIC23    QATTCL
    TAADAUIR      *PGM       RPG         TAADAUIR      QATTRPG
    TAADAUIR4     *PGM       RPG         TAADAUIR4     QATTRPG
    TAADAUIR6     *PGM       RPG         TAADAUIR6     QATTRPG
    TAADAUIR7     *PGM       RPG         TAADAUIR7     QATTRPG
    TAADAUIR9     *PGM       RPG         TAADAUIR9     QATTRPG
    TAADAUIP      *FILE      PF          TAADAUIP      QATTDDS

 The  TAADAUIP object is  duplicated from TAATOOL  during the processing
 of WRKBUSCAL to hold the  'include dates'.  The object is  deleted when
 the command completes.

 Structure
 ---------

 CRTBUSCAL   Cmd
    TAADAUIC   CL pgm

 DLTBUSCAL   Cmd
    TAADAUIC2  CL pgm

 WRKBUSCAL   Cmd
    TAADAUIC   CL pgm
      TAADAUIR   RPG pgm
         TAADAUIC21  CL Pgm - Converts exclude dates
         TAADAUIC22  CL Pgm - Converts include dates
    TAADAUIC23 CL pgm is used for the prompt override

 DSPBUSCAL   Cmd
    TAADAUIC4  CL pgm
      TAADAUIR4  RPG pgm

 RTVBUSCALA  Cmd
    TAADAUIC5  CL pgm

 CLCBUSCAL   Cmd
    TAADAUIC6  CL pgm
      TAADAUIR6  RPG pgm

 CLCBUSCAL2  Cmd
    TAADAUIC11  CL pgm

 DSPENDDAY   Cmd
    TAADAUIC7  CL pgm
      TAADAUIR7  RPG pgm

 CLCENDDAY   Cmd
    TAADAUIC8  CL pgm
      TAADAUIR7  RPG pgm  - Same pgm as DSPENDDAY

 DSPSTRDAY   Cmd
    TAADAUIC9  CL pgm
      TAADAUIR9  RPG pgm

 CLCSTRDAY   Cmd
    TAADAUIC10 CL pgm
      TAADAUIR9  RPG pgm  - Same pgm as DSPSTRDAY

 CHKBUSCALD  Cmd
    TAADAUIC12 CL pgm

Added to TAA Productivity Tools February 1, 2005


Home Page

Powered by AS/400Powered by AS/400 Last modified on January 12, 2010 © 1995, 2010 - Jim Sloan, Inc.