TAA Tools
RTVDAT5         RETRIEVE DATE 5                        TAADAUP

The Retrieve Date 5 command  allows an input of a one digit  day of the
week (1  = Sunday) and/or  a 2 digit  month (01 =  January) and returns
the  spellings for the  day and month.   RTVDAT5 may  be used following
RTVDAT4 to return the spelling of the day.

For the best performance,  all return variables should be  specified as
this will avoid  the MCH3601 message from being  sent to a non-existent
return  variable.  While these  messages are removed  from the job log,
performance is better if the messages are not sent.

A typical series of commands would be:

             DCL        &DAY9 *CHAR LEN(9)
             DCL        &MONTH9 *CHAR LEN(9)
             DCL        &DAY3U *CHAR LEN(3)
             DCL        &DAY3L *CHAR LEN(3)
             DCL        &MTH3U *CHAR LEN(3)
             DCL        &MTH3L *CHAR LEN(3)
              .
             RTVDAT5    DAYOFWEEK('1') MTH('01') +
                          DAYNAME(&DAY9) MTHNAME(&MONTH9) +
                          DAY3U(&DAY3U) DAY3L(&DAY3L) MTH3U(&MTH3U) +
                          MTH3L(&MTH3L)

The &DAY9 value  would be returned  as 'Sunday' and  the &MONTH9  value
would be returned as 'January'.

The day  and month  names may  be translated to  a non-English  name by
specifying  XLATE(*YES) and supplying a  data area as  described by the
RTVDAT2 command.

The DAYOFWEEK  and  MTH  parameters  are optional.    If  DAYOFWEEK  is
specified, but MTH  is blank, the  3 month return variables  are filled
with asterisks.   If MTH  is specified, but  DAYOFWEEK is blank,  the 3
day return variables are filled with asterisks.

RTVDAT5 escape messages you can monitor for
-------------------------------------------

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

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

   DAYOFWEEK     The   one  digit  day  of  week  that  determines  the
                 spelling of the 3  day name return parameters.   A '1'
                 should  be  passed for  Sunday.    The  value for  the
                 DAYOFWEEK  may be  determined  by the  RTVDAT4 command
                 for any date.

   MTH           The two digit  month of the  year that determines  the
                 spelling  of  the  3  month  name  parameters.    '01'
                 should be passed for January.

   DAYNAME       The   name  of   the  day   based  on   the  DAYOFWEEK
                 parameter.  For  example, 'Sunday'  would be  returned
                 for DAYOFWEEK('1').

                 This  is an  optional  return  variable that  if  used
                 must be specified as *CHAR LEN(9).

   MTHNAME       The  name of  the month  based  on the  MTH parameter.
                 For   example,   'January'  would   be   returned  for
                 MTH('01')

                 This is  an  optional  return variable  that  if  used
                 must be specified as *CHAR LEN(9).

   DAY3U         The  name of  the  day  as a  3  character upper  case
                 value   based  on   the  DAYOFWEEK  parameter.     For
                 example, 'SUN' would  be returned for  DAYOFWEEK('1').

                 This  is an  optional  return  variable that  if  used
                 must be specified as *CHAR LEN(3).

   DAY3L         The  name  of the  day  as a  3  character  lower case
                 value  based  on   the  DAYOFWEEK   parameter.     For
                 example, 'Sun'  would be returned  for DAYOFWEEK('1').

                 This  is  an optional  return  variable  that if  used
                 must be specified as *CHAR LEN(3).

   MTH3U         The  name of  the month  as a  3 character  upper case
                 value  based  on the  MTH  parameter.    For  example,
                 'JAN' would be returned for MTH('01')

                 This  is  an optional  return  variable  that if  used
                 must be specified as *CHAR LEN(3).

   MTH3L         The  name of  the month  as a  3 character  lower case
                 value based  on  the  MTH  parameter.    For  example,
                 'Jan' would be returned for MTH('01')

                 This  is an  optional  return  variable that  if  used
                 must be specified as *CHAR LEN(3).

   XLATE         Whether  a  translation of  the  day  and month  names
                 should be  done.   *NO is  the default  which  returns
                 English spellings.

                 *YES may be  specified with or without a  RTVDAT2 data
                 area on  the library list.   See the  RTVDAT2 tool for
                 how  to create  the data area.   If  *YES is specified
                 and  no  data  area  exists,  English   spellings  are
                 returned.


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

Because RTVDAT5  returns variables, the command  may only be  used in a
CL program.

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

The following TAA Tools must be on your system:

     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   RTVDAT5       *CMD                   TAADAUP       QATTCMD
   TAADAUPC      *PGM       CLP         TAADAUPC      QATTCL
					

Added to TAA Productivity tools January 1, 2008


Home Page Up to Top