TAA Tools
CVTTIMSTM       CONVERT TIME STAMP                     TAATINY

The Convert Time Stamp command  converts a time stamp of 26  bytes to a
return  data  structure.    Individual  fields  in the  data  structure
contain  the  the  date  and  time in  various  formats  such  as CYMD,
HHMMSS, the edited date, and  the edited time.  The CPP  (TAATINYC) can
also be called from a HLL program.

The edited  date appears in job  format with the  job format separator.
The edited time appears with the job time separator.

You can see the layout of the data structure with the command:

             DSPFMT   TAATINYP

The  following source  is in  the proper  format to  be copied  to your
program.   You must  first convert  the documentation  member from  the
TAA archive  to an  actual source  member such as  to file  QATTINFO in
TAATOOL.

             CPYTAA  TAAARCMBR(CVTTIMSTM) TOFILE(TAATOOL/QATTINFO)

Then use  the browse function from your source  editor to copy from the
CVTTIMSTM member for one of the following:

CL Coding
---------

             DCL        VAR(&TIMESTAMP) TYPE(*CHAR) LEN(26)
             DCL        VAR(&TIMSTM) TYPE(*CHAR) LEN(125)
             DCL        VAR(&YYYY) TYPE(*CHAR) STG(*DEFINED) LEN(4) +
                          DEFVAR(&TIMSTM 1)
             DCL        VAR(&CENT1) TYPE(*CHAR) STG(*DEFINED) LEN(1) +
                          DEFVAR(&TIMSTM 5)
             DCL        VAR(&CENT2) TYPE(*CHAR) STG(*DEFINED) LEN(2) +
                          DEFVAR(&TIMSTM 6)
             DCL        VAR(&CYY) TYPE(*CHAR) STG(*DEFINED) LEN(3) +
                          DEFVAR(&TIMSTM 8)
             DCL        VAR(&CYMD) TYPE(*CHAR) STG(*DEFINED) LEN(7) +
                          DEFVAR(&TIMSTM 11)
             DCL        VAR(&CCYMD) TYPE(*CHAR) STG(*DEFINED) LEN(8) +
                          DEFVAR(&TIMSTM 18)
             DCL        VAR(&YYMMDD) TYPE(*CHAR) STG(*DEFINED) LEN(6) +
                          DEFVAR(&TIMSTM 26)
             DCL        VAR(&YY) TYPE(*CHAR) STG(*DEFINED) LEN(2) +
                          DEFVAR(&TIMSTM 32)
             DCL        VAR(&MM) TYPE(*CHAR) STG(*DEFINED) LEN(2) +
                          DEFVAR(&TIMSTM 34)
             DCL        VAR(&DD) TYPE(*CHAR) STG(*DEFINED) LEN(2) +
                          DEFVAR(&TIMSTM 36)
             DCL        VAR(&EDTDAT) TYPE(*CHAR) STG(*DEFINED) LEN(8) +
                          DEFVAR(&TIMSTM 38)
             DCL        VAR(&HH) TYPE(*CHAR) STG(*DEFINED) LEN(2) +
                          DEFVAR(&TIMSTM 46)
             DCL        VAR(&MN) TYPE(*CHAR) STG(*DEFINED) LEN(2) +
                          DEFVAR(&TIMSTM 48)
             DCL        VAR(&SS) TYPE(*CHAR) STG(*DEFINED) LEN(2) +
                          DEFVAR(&TIMSTM 50)
             DCL        VAR(&MS) TYPE(*CHAR) STG(*DEFINED) LEN(6) +
                          DEFVAR(&TIMSTM 52)
             DCL        VAR(&HHMMSS) TYPE(*CHAR) STG(*DEFINED) LEN(6) +
                          DEFVAR(&TIMSTM 58)
             DCL        VAR(&EDTTIM) TYPE(*CHAR) STG(*DEFINED) LEN(8) +
                          DEFVAR(&TIMSTM 64)
             DCL        VAR(&STMP26) TYPE(*CHAR) STG(*DEFINED) +
                          LEN(26) DEFVAR(&TIMSTM 72)
             DCL        VAR(&RSVD) TYPE(*CHAR) STG(*DEFINED) LEN(28) +
                          DEFVAR(&TIMSTM 98)
             CVTTIMSTM   TIMESTAMP(*CURRENT) RTNDS(&TIMSTM)
                         /* The data structure fields such as CYMD */
                         /*   EDTDAT, or EDTTIM may now be used    */

RPG III Coding
--------------

     I* CVTTIMSTM data structure
     I              'TAATOOL/TAATINYC'    C         PGMNAM
     ITIMSTM    E DSTAATINYP
     .
     C                     CALL PGMNAM
     C                     PARM '*CURRENT'XSTAMP 26
     C                     PARM           TIMSTM
     C* Fields such as EDTDAT and CYMD may now be used

RPG IV Coding
-------------

     D* CVTTIMSTM data structure
     D PGMNAM          C                   CONST('TAATINYC')
     D TIMSTM        E DS                  EXTNAME(TAATINYP)
     .
     C                   CALL      PGMNAM
     C                   PARM      '*CURRENT'    XSTAMP           26
     C                   PARM                    TIMSTM
     C* Fields such as EDTDAT and CYMD may now be used


CVTTIMSTM escape messages you can monitor for
---------------------------------------------

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

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

   TIMESTAMP     A time stamp  value (26  bytes) or  the special  value
                 *CURRENT for the current time stamp.

   RTNDS         The return  data structure  that must  be declared  as
                 *CHAR  LEN(125).  See  the documentation  examples for
                 how  to  copy in  code in  the  proper format  for the
                 language you are using.


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

Because the  CVTTIMSTM  command returns  a  variable, the  command  may
only be used in a CL program.

The CPP TAATINYC may be called directly from a HLL program.

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

The following TAA Tools must be on your system:

     CVTTIM          Convert time
     RTVTIMSTM       Retrieve time stamp
     SNDESCINF       Send escape information

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

None, the tool is ready to use.

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

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

   CVTTIMSTM     *CMD                   TAATINY       QATTCMD
   TAATINYC      *PGM       CLP         TAATINYC      QATTCL
   TAATINYP      *FILE      PF          TAATINYP      QATTDDS

The TAATINYP  file is  intended to be  used as an  externally described
data structure.
					

Added to TAA Productivity tools January 15, 2012


Home Page Up to Top