TAA Tools
CVTTIM          CONVERT TIME                           TAATIMT

The Convert Time  command ensures a  time format of hhmmss  or hh:mm:ss
(using  the  job time  separator)  from a  value  of *CURRENT,  another
hhmmss  format, or  a format  with valid  separators such  as hh.mm.ss.
The time is also checked to ensure it is valid.

A typical command would be:

             DCL            &TOTIME *CHAR LEN(6)
             DCL            &FROMTIME *CHAR LEN(8)

The value of &FROMTIME can be:

           - *CURRENT
           - A date in hhmmss format
           - A date in hh:mm:ss format (with any valid separator)

The valid separator characters are:

           :    Colon
           .    Period
           ,    Comma
          ' '   Blank

TAATIMTC2 program

The TAATIMTC2  program is  intended to  be called  when a  6 byte  time
field (in  HHMMSS format) needs to  be converted to  hh:mm:ss where the
time separator is based on the job attribute.

A valid time is also checked.

The following statements and subroutine can be copied.

     I* Qualified program name for CVTTIM
     I              'TAATOOL/TAATIMTC2'   C         ZZTIMC

     C                     MOVELxxx       ZZFTIM           From time
     C                     MOVEL'yyyyyy  'ZZTIMN           Name of fld
     C                     EXSR ZZCVTT                     Convert time
     C                     MOVE ZZTTIM    zzzzz            To time

     C*                                                              *
     C*     ZZCVTT  Convert time - From HHMMSS to HH:MM:SS           *
     C*               with job time separators                       *
     C*                                                              *
     C           ZZCVTT    BEGSR                           Convert time
     C                     CALL ZZTIMC                     Time convert
     C                     PARM           ZZFTIM  6        From time
     C                     PARM           ZZTTIM  8        To time
     C                     PARM           ZZTIMN 10        Time field
     C                     ENDSR                           Convert time

CVTTIM escape messages you can monitor for

      CPF9898    Invalid time or separator

Command parameters                                    *CMD

   FROMTIME      The  From Time  value.  The  value may  be *CURRENT, a
                 date in the format hhmmss,  or a date with  separators
                 such  as hh:mm:ss.    The valid  separators are  colon
                 (:), period (.), comma (,), or blank ( ).

   TOTIME        The converted  time value in the  format hhmmss.  This
                 is an optional  return variable that  if used must  be
                 specified as *CHAR LEN(6).

   TOTIME8       The  converted  time  value  in  the  format  hh:mm:ss
                 where the  job's time separator  is used.   This is an
                 optional   return  variable  that   if  used  must  be
                 specified as *CHAR LEN(8).


Because the command  returns a variable,  it may only  be used in  a CL


The following TAA Tools must be on your system:

     CHKTIM          Check time
     SNDESCMSG       Send escape message


None, the tool is ready to use.

Objects used by the tool

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

   CVTTIM        *CMD                   TAATIMT       QATTCMD
   TAATIMTC      *PGM       CLP         TAATIMTC      QATTCL
   TAATIMTC      *PGM       CLP         TAATIMTC      QATTCL
   TAATIMTC2     *PGM       CLP         TAATIMTC2     QATTCL

Added to TAA Productivity tools December 15, 2000

Home Page Up to Top