Discussion:
System Date anomalies in V5R1
(too old to reply)
Khouw Thiam Hok
2003-09-26 23:53:48 UTC
Permalink
Hi guys,
I don't know whether this matter has been discussed in this forum.

Try this way:
Do not logoff from your workstation today (lets say Sept 26,2003) , let the
system gets to the next system date -sysval QDATE (Sept 27,2003).

After sysval QDATE changed then get back to your unlogoff workstation

a. in CLP/CLLE , you may find that your command RTVJOBA to retrieve date ,
will give the return value Sept 26, 2003 instead of Sept 27, 2003 (return
value with the date of your login's date)

b. in DSPF, you may find that your keyword date will give you Sept 26, 2003
instead of Sept 27, 2003 (displayed with the date of your login's date)

c, in RPG/RPGLE, you may find that operation code *date or udate will give
you the date of your login's date.

For comparison, try 'sysreq' to the other session or other workstation with
new fresh login and do the point a, b and c. Then you will get the real
value of return date.

Hmmmm , is it considered as bugs or IBM's new features?

HOK
Terrence Enger
2003-09-27 00:01:56 UTC
Permalink
Post by Khouw Thiam Hok
Hi guys,
I don't know whether this matter has been discussed in this forum.
Do not logoff from your workstation today (lets say Sept 26,2003) , let the
system gets to the next system date -sysval QDATE (Sept 27,2003).
After sysval QDATE changed then get back to your unlogoff workstation
a. in CLP/CLLE , you may find that your command RTVJOBA to retrieve date ,
will give the return value Sept 26, 2003 instead of Sept 27, 2003 (return
value with the date of your login's date)
b. in DSPF, you may find that your keyword date will give you Sept 26, 2003
instead of Sept 27, 2003 (displayed with the date of your login's date)
c, in RPG/RPGLE, you may find that operation code *date or udate will give
you the date of your login's date.
For comparison, try 'sysreq' to the other session or other workstation with
new fresh login and do the point a, b and c. Then you will get the real
value of return date.
Hmmmm , is it considered as bugs or IBM's new features?
HOK
Actually, it's a very old feature.

Terry.
Available for contract programming.
gb
2003-09-27 00:02:19 UTC
Permalink
RPG date fields UDATE, UYEAR, UMONTH, UDAY are the JOB date i.e. the date
the job was initiated on the system.
RTVJOBA DATE is also the JOB date...

The RPG opcode TIME, RTVSYSVAL QDATE etc. access the current system time and
therefore change after midnight...

It's been like that since God was a lad...
Post by Khouw Thiam Hok
Hi guys,
I don't know whether this matter has been discussed in this forum.
Do not logoff from your workstation today (lets say Sept 26,2003) , let
the
Post by Khouw Thiam Hok
system gets to the next system date -sysval QDATE (Sept 27,2003).
After sysval QDATE changed then get back to your unlogoff workstation
a. in CLP/CLLE , you may find that your command RTVJOBA to retrieve date ,
will give the return value Sept 26, 2003 instead of Sept 27, 2003 (return
value with the date of your login's date)
b. in DSPF, you may find that your keyword date will give you Sept 26, 2003
instead of Sept 27, 2003 (displayed with the date of your login's date)
c, in RPG/RPGLE, you may find that operation code *date or udate will give
you the date of your login's date.
For comparison, try 'sysreq' to the other session or other workstation with
new fresh login and do the point a, b and c. Then you will get the real
value of return date.
Hmmmm , is it considered as bugs or IBM's new features?
HOK
Francis Lapeyre
2003-09-27 00:42:44 UTC
Permalink
Post by Khouw Thiam Hok
Hi guys,
I don't know whether this matter has been discussed in this forum.
Do not logoff from your workstation today (lets say Sept 26,2003) ,
let the system gets to the next system date -sysval QDATE (Sept
27,2003).
After sysval QDATE changed then get back to your unlogoff workstation
a. in CLP/CLLE , you may find that your command RTVJOBA to retrieve
date , will give the return value Sept 26, 2003 instead of Sept 27,
2003 (return value with the date of your login's date)
b. in DSPF, you may find that your keyword date will give you Sept
26, 2003 instead of Sept 27, 2003 (displayed with the date of your
login's date)
c, in RPG/RPGLE, you may find that operation code *date or udate will
give you the date of your login's date.
For comparison, try 'sysreq' to the other session or other
workstation with new fresh login and do the point a, b and c. Then
you will get the real value of return date.
Hmmmm , is it considered as bugs or IBM's new features?
It's always been that way. RTVJOBA in CL returns the date when that job was
started (and even that can be changed by the CHGJOB command). If you want
the current date and time always, you need to RTVSYSVAL QDATE / QTIME in CL,
or use the TIME opcode in RPG .
--
Regards,
Francis (Address is filtered by SpamCop)

"When once you have tasted flight, you will forever walk the Earth with your
eyes turned skyward, for here you have been, and there you will always long
to return."

--Leonardo da Vinci
Dale Berta
2003-09-27 01:56:40 UTC
Permalink
As others have pointed out, this is intentional. The job date (UDATE in
RPG), is the date that the job started, not the current system clock.

The purpose of this, is that you can place UDATE on your report page
headings, and it will show the same date for the entire report, even if the
report is generated across the midnight boundary. If UDATE changed with the
system date, then your report would show different generation dates on
different pages, which is not generally what you want.
Post by Khouw Thiam Hok
Hi guys,
I don't know whether this matter has been discussed in this forum.
Do not logoff from your workstation today (lets say Sept 26,2003) , let
the
Post by Khouw Thiam Hok
system gets to the next system date -sysval QDATE (Sept 27,2003).
After sysval QDATE changed then get back to your unlogoff workstation
a. in CLP/CLLE , you may find that your command RTVJOBA to retrieve date ,
will give the return value Sept 26, 2003 instead of Sept 27, 2003 (return
value with the date of your login's date)
b. in DSPF, you may find that your keyword date will give you Sept 26, 2003
instead of Sept 27, 2003 (displayed with the date of your login's date)
c, in RPG/RPGLE, you may find that operation code *date or udate will give
you the date of your login's date.
For comparison, try 'sysreq' to the other session or other workstation with
new fresh login and do the point a, b and c. Then you will get the real
value of return date.
Hmmmm , is it considered as bugs or IBM's new features?
HOK
pierre legault
2003-09-29 00:43:31 UTC
Permalink
*DATE and UDATE will give you the session date. If you dont want any problem
for the date, you should use TIME.
By the way, this is not new. We had the same problem with V4r5 because we
are running 24 hours a days .
By using TIME command instead of *DATE it will reasolve your problem.

Pierre Legault
Post by Khouw Thiam Hok
Hi guys,
I don't know whether this matter has been discussed in this forum.
Do not logoff from your workstation today (lets say Sept 26,2003) , let
the
Post by Khouw Thiam Hok
system gets to the next system date -sysval QDATE (Sept 27,2003).
After sysval QDATE changed then get back to your unlogoff workstation
a. in CLP/CLLE , you may find that your command RTVJOBA to retrieve date ,
will give the return value Sept 26, 2003 instead of Sept 27, 2003 (return
value with the date of your login's date)
b. in DSPF, you may find that your keyword date will give you Sept 26, 2003
instead of Sept 27, 2003 (displayed with the date of your login's date)
c, in RPG/RPGLE, you may find that operation code *date or udate will give
you the date of your login's date.
For comparison, try 'sysreq' to the other session or other workstation with
new fresh login and do the point a, b and c. Then you will get the real
value of return date.
Hmmmm , is it considered as bugs or IBM's new features?
HOK
Dan Hicks
2003-09-29 23:30:52 UTC
Permalink
Post by pierre legault
*DATE and UDATE will give you the session date. If you dont want any problem
for the date, you should use TIME.
By the way, this is not new. We had the same problem with V4r5 because we
are running 24 hours a days .
You're right, it's not new. It's been like this since release 1 of
System/38.
--
Dan Hicks
Be slow in choosing a friend, slower in changing. --Benjamin Franklin
pierre legault
2003-09-29 00:48:05 UTC
Permalink
You should use TIME command instead of *DATE or UDATE.
By the way, this is not new. We had to use TIME because we are running 24
hours a day.

Pierre
Post by Khouw Thiam Hok
Hi guys,
I don't know whether this matter has been discussed in this forum.
Do not logoff from your workstation today (lets say Sept 26,2003) , let
the
Post by Khouw Thiam Hok
system gets to the next system date -sysval QDATE (Sept 27,2003).
After sysval QDATE changed then get back to your unlogoff workstation
a. in CLP/CLLE , you may find that your command RTVJOBA to retrieve date ,
will give the return value Sept 26, 2003 instead of Sept 27, 2003 (return
value with the date of your login's date)
b. in DSPF, you may find that your keyword date will give you Sept 26, 2003
instead of Sept 27, 2003 (displayed with the date of your login's date)
c, in RPG/RPGLE, you may find that operation code *date or udate will give
you the date of your login's date.
For comparison, try 'sysreq' to the other session or other workstation with
new fresh login and do the point a, b and c. Then you will get the real
value of return date.
Hmmmm , is it considered as bugs or IBM's new features?
HOK
Continue reading on narkive:
Loading...