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.
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>