CVTDAYN CONVERT DAY N TO A NEW DATE TAADATC |
The Convert Day N command allows you to make a prompt where the
operator can easily request a date in the near future by keying in
the special values *DAY1 *DAY2 ... *DAY60.
The command converts the current date plus the special value and
returns a new date.
The command is set up so that the operator can be presented with a
prompt that would appear as follows (this would be coded as a keyword
on a command or as a prompt on one of your displays):
Date (job fmt) *TODAY *DAYnn *TODAY
------
The variable should be coded as a *CHAR LEN(6) field. No special
checking need be performed in your command definition or program.
The value entered can be directly passed to the CVTDAYN command. If
the value is entered as a date (e.g. 120109) it will be checked to
see if it is valid. If not, CPF9898 will be issued. The system
format should be used for entering a date.
You may specify a different default than *TODAY.
The typical CVTDAYN command would be coded in your CL program as:
CVTDAYN DATE(&xxx) CVTDAT(&NEWDAT)
where &xxx is your variable name where the user entered the date.
If todays date is 6/21/09 and the operator entered *DAY14, the value
returned would be 090305.
Because a return variable is used, the command can only be executed
in a CL program.
Command parameters
------------------
DATE The date to be specified (in job format) or the
special values *TODAY, *DAY1, *DAY2 ... *DAY60.
CVTDAT The return variable for the converted date. This
must be coded as a 6 position character field.
LIMIT This parameter allows you to put a limit of less
than 60 days for the DATE parameter. The default is
*DAY60. If you do not want the operator to specify
a date greater than 10 days in the future specify
*DAY10.
Restrictions
------------
None.
Prerequisites
-------------
The following TAA Tools must be on your system:
ADDDAT Add date
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ----- --------- ---------- -----------
CVTDAYN *CMD TAADATC QATTCMD
TAADATCC *PGM CLP TAADATCC QATTCL
|
Added to TAA Productivity tools April 1, 1995