db
Let me take a shot.
The manual says that the return value you generate (the command string) is
to be written as if you were entering stuff on a command line. So I think
you only need to follow the rules as given in the PARM help text for
entering dates and times. Or, to put it another way, you need to use the
values you would put on the screen, not those that are sent to the CPP.
Look at the discussion on special values to get a sense of the difference.
The rules for dates/times are as follows:
When a date value is specified in this PARM statement, it must be
specified in one of the following formats mmddyy, mmddyyyy, or
Cyymmdd. When a user types a date in the command at run time, it must be
specified in the job-date format. The job date separator may be used when
the date is entered. If the separator character is used, the date must be
enclosed in apostrophes.
When a user types a time in the command at run time, it must be specified
in the format hhmmss. The job time separator may be used when the time is
entered. If the separator character is used, the time must be enclosed in
apostrophes.
I don't remember whether the command parser will expand raw dates/times to
those with separators. But I think you can cover your needs by using
apostrophes around each, as in
??STARTDATE('01/22/2003') ??STARTTIME('12:23:00')
in your returned string.
I don't think there is a direct relationship between choice programs and
prompt override programs. You will often use both, however.
HTH and is correct
Vern
At 09:51 AM 10/25/2004, you wrote:
Does anyone have an example of a Prompt Override Program involving dates and
times that they would be willing to share? Or pointers to online examples
are fine as well. Would like to know how these elements need to be
formatted. I would like them to be displayed as mm/dd/yyyy and hh:mm:ss.
Does one *have* to use a Choice Program as well? Some of the archives on
the topic connect the two, although my mind is still in MMM (Monday Morning
Mode).
FWIW, this is v5r2. I have looked at chapter 9 in the CL Programming ref.
tia,
db