TAA Tools

The Retrieve System Date  command is designed for situations  where the
system  date  format is  not  known  and could  be  Julian.   RTVSYSDAT
returns  a CYMD value for the current date  using the API QWCRSVAL.  It
also returns the current date in job format.

If a Julian  date is used  for the system  date format (QDATFMT  System
Value), the  normal RTVSYSVAL command  fails if the return  variable is
specified as *CHAR LEN(6).  It must be declared as *CHAR LEN(5).

A typical Retrieve System Date solution would be:

             DCL           &CURDAT *CHAR LEN(7) /* Date as CYMD */
             RTVSYSDAT     DATE(&CURDAT)

The date would be returned in CYMD format such as 1011231.

The  JOBFMTDAT is intended  for cases  where the system  date is needed
in job date  format.  Some  applications retrieve the  system date  and
then may  attempt to use it  assuming it is  in the same format  as the
job date.   Since the system date and job  date formats may differ, the
JOBFMTDAT value may be helpful.

RTVSYSDAT escape messages you can monitor for

      TAA9891    The QDATE system value is locked.

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

Command parameters                                    *CMD

   DATE          An optional return value for  the system date in  CYMD
                 format.    If  used, it  must  be  declared  as  *CHAR

   JOBFMTDAT     An optional  return value for  the system date  in job
                 date  format.  If  used, it must  be declared as *CHAR


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




None, the tool is ready to use.

Objects used by the tool

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

   RTVSYSDAT     *CMD                   TAADAUE       QATTCMD
   TAADAUEC      *PGM       CLP         TAADAUEC      QATTCL

Added to TAA Productivity tools February 1, 2001

Home Page Up to Top