TAA Tools
CLCDATTIM       CALCULATE DATE/TIME                    TAADATK

The Calculate  Date/Time command allows  you to  add hours and  minutes
to  a  specific date/time  and  receive return  variables  for the  new
date/time.    The command  is  designed to  provide  the input  for the
SCDDATE and SCDTIME parameters on SBMJOB.

A typical use of  the command would be to  submit a job that would  run
one hour from the current time:

          DCL           &RTNDAT *CHAR LEN(6)
          DCL           &RTNTIM *CHAR LEN(6)
           .
           .
          CLCDATTIM     ADDHRS(1) RTNDAT(&RTNDAT) RTNTIM(&RTNTIM)
          SBMJOB        CMD(...) SCDDATE(&RTNDAT) SCDTIM(&RTNTIM)

The default  for FROMDATE  and FROMTIME  is used in  the example.   You
can  specify a 'from  date' and/or  'from time', but  the return values
must be in the future.

CLCDATTIM properly handles  all of the  unique date/time problems  such
as:

     - Rolling over to a new hour
     - Rolling over to a new day
     - Rolling over to a new year
     - Leap year
     - Rolling over to the next century

The  following escape  messages  will be  sent which  you  may wish  to
monitor for:

  **   TAA9892.   The  date to  be  returned is  less than  the current
       date.

  **   TAA9893.  The  date is  the same as  the current  date, but  the
       time to be returned is less than the current time.

  **   TAA9894.   The  date to  be  returned has  rolled  over to  2040
       which exceeds the internal limit of CLCDATTIM.

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

   ADDHRS        The number  of hours to  be added to the  FROMTIME.  A
                 value of 0-99 must be specified.

   ADDMIN        The  number of minutes to be  added.  A value of 0-999
                 may be specified.  The default is 0.

   RTNDAT        The return date  in job format.   It must be  declared
                 as  *CHAR LEN(6).   Job format  is required  by SBMJOB
                 for the SCDDATE parameter.

   RTNTIM        The  return  time  in  HHMMSS  format.    It  must  be
                 declared as *CHAR  LEN(6).   This is  the same  format
                 required by SBMJOB for the SCDTIME parameter.

   FROMDATE      The from  date.  The  default is *CURRENT  meaning the
                 current  date.  If  a value is  entered, it must  be a
                 valid date in job date format.

   FROMTIME      The from time.   The default  is *CURRENT meaning  the
                 current time.   If a value  is entered, it must  be in
                 HHMMSS format and be between 000000 and 235959.

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

Because  the command returns  variables, it can  only be executed  in a
CL program.

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

The following TAA Tools must be on your system:

        SNDESCMSG    Send escape message

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

None, the tool is ready to use.

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

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

   CLCDATTIM     *CMD                   TAADATK       QATTCMD
   TAADATKC      *PGM       CLP         TAADATKC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top