


IIRC, the DATE() and CYMDDATE() parameters will return the job date, while DATETIME() returns current date. That is, the date from either of the first two parameters can be different from the date from the third parameter.
Job date is set at the moment that the job starts; it doesn't change while the job runs even past midnight.
Current date changes at midnight.
If your job starts to run at 10:30 PM on Oct 19, 2010, and continues running for five hours, the job date will still be 10/19/2010 while the job is ending. But the current date will have changed to 10/20/2010.
RTVJOBA DATE(&date) will return the date from before midnight if the job started before midnight.
If the job simply was stuck on a job queue until after midnight and then it started, it will get the date after midnight.
Tom
Here is the HELP text for RTVJOBA
<pre> CL var for DATETIME (20) (DATETIME) – Help
Specifies the name of a CL variable that receives the current local date
and time of the job. The variable must be a character variable with a
minimum length of 20 characters. The local job date and time is
returned in the format YYYYMMDDHHNNSSXXXXXX where YYYY is the year, MM
is the month, DD is the day, HH is the hours, NN is the minutes, SS is
the seconds, and XXXXXX is the microseconds.
That looks like it either the started or current time for a job.
If you want to get the time it entered the system, you would need to do a DSPJOB output(*PRINT) then interagate the spool file. The entered data/time is available there.</pre>


Don’t need to get the time it entered the system, just need to know which it will return. If returns the date prior to midnight that is good. If it returns the date after midnight then I need to move it back a day. At month end this becomes a critical question.
Thanks so much for the help!!
Just to test results, I submitted a trivial CL program that did DLYJOB until 1:15 AM, retrieved all three dates, and ran DMPCLPGM.
The first two values show the “job date” of Oct 19, 2010. The timestamp shows “current” date/time with Oct 20, 2010, for the date.
So, you get a choice.
Tom
Great Tom, thanks!