|
>From my "Everything You Always Wanted to Know about System Values (but were
afraid to ask)" session that I give at COMMON and elsewhere.
Name: QTIME
Description: Time of Day
Length & Type: Character: 6 (or greater)
Comments: The value of QTIME is like a data structure made up
from QHOUR, QMINUTE and QSECOND.
The DSPSYSVAL and WRKSYSVAL commands display hours,
minutes and seconds.
The RTVSYSVAL command can retrieve fractions if a
second:
Length of
CL Character Meaning
Variable
|-----------+------------------------------|
| <6 | Invalid * |
|-----------+------------------------------|
| 6 | Hours, minutes, seconds. |
|-----------+------------------------------|
| 7 |Hours, minutes, seconds, and |
| |tenths of a second. |
|-----------+------------------------------|
| 8 | Hours, minutes, seconds, |
| | tenths of a second, and |
| | hundredths of a second. |
|-----------+------------------------------|
| 9 | Hours, minutes, seconds, |
| | tenths of a second, |
| | hundredths of a second, and |
| | thousandths of a second. |
|-----------+------------------------------|
| >9 | Hours, minutes, seconds, |
| | tenths of a second, |
| | hundredths of a second, and |
| | thousandths of a second |
| | padded on the right with |
| | blanks. |
|-----------+------------------------------|
The Change System Value (CHGSYSVAL)
command sets milliseconds to zero.
Also changed by "IPL Options"
display.
* Any attempt to retrieve QTIME into a CL variable
with less than six characters will result in a CPF1095
escape message.
Al Barsa, Jr.
Barsa Consulting Group, LLC
400>390
914-251-1234
914-251-9406 fax
http://www.barsaconsulting.com
http://www.taatool.com
Scott Klement
<klemscot@klements. To: midrange-l@midrange.com
com> cc:
Sent by: Subject: Re: Can we retrieve
MILLISECONDS?
midrange-l-admin@mi
drange.com
02/14/02 12:47 AM
Please respond to
midrange-l
On Wed, 13 Feb 2002, Rick Rayburn wrote:
>
> Got a request to capture the time of a transaction in hours, minutes,
> seconds...and, believe it or not...milli-seconds!
>
> Please don't ask me why...mine is not to ask...etc....
Heh. I believe it! Actually, you shouldn't be so surprised, this is
a pretty common question, so it must be a pretty common issue. I've
answered it a few times already :)
Here's where I posted an example of getting Milliseconds (1/1000th of a
second):
http://archive.midrange.com/rpg400-l/200101/msg00867.html
Here's where I posted an example of getting Microseconds (1/1000000 of a
second):
http://archive.midrange.com/midrange-l/200102/msg00639.html
>
> Anyway to enhance the captured time within an RPG program, API or
whatever,
> with...milli-seconds?
>
> I know, I know...
>
> Thanks for any assistance in this matter!
>
The millisecond technique could be adapted to RPG/400 (RPG III) as well
if you had the need.
Good luck!
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.