× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think the input to that BIF has to be a TIMESTAMP value and the output is an integer.

So...
"Microsec6 = %MSECONDS(utime@hms);" fails because the input is a 6 bytes char. "Microsec6 = %MSECONDS(timestamp);" fails because the input is 14 bytes zoned. "Microsec6 = %MSECONDS(time());" fails because the input is a TIME field and not TIMESTAMP. (I'm assuming you meant %time() BIF, right? If not then what does the time() procedure return?) "Microsec = %MSECONDS(track@06);" fails because the input is 6 bytes char and the output is also 6 bytes char. "Microsec = %MSECONDS(timestamp);" fails because the input is 14 bytes zoned and the output is 6 bytes char.

HTH

Charlie Randall wrote:
* -- Data Structures...
d Tracking#       ds            20
d  Track@14                     14a   inz
d  Track@06                      6a   inz
d* -- Time in Microseconds --
d Microsec        ds
d  microsec6                     6s 0 inz
d  microsec5                     5a   overlay(microsec6)
d  microsec1                     1a   overlay(microsec6:6)
 * ---- Time Stamp...
d time@stamp@a    ds
d  timestamp                    14s 0 inz
d   utime@hms                    6a   overlay(timestamp)
d    utime@sec                   1a   overlay(utime@hms:6)
d   udate@mdcy                   8a   overlay(timestamp:7)
/end-free
C                   time                    timestamp
 /free
      Track@06 = utime@hms;

      Microsec6 = %MSECONDS(utime@hms);
      Microsec6 = %MSECONDS(timestamp);
      Microsec6 = %MSECONDS(time());
Microsec = %MSECONDS(track@06); Microsec = %MSECONDS(timestamp);

I have tried each of the above 5 bif commands with one or both of the
errors
Below,  I guess I do not follow how a duration BIF is supposed to work.

Charlie



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Levy
Sent: Wednesday, October 04, 2006 4:34 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: %mseconds BIF

Could you post the RPG statement that is failing along with the attributes of the variables used?

It would be a great help.

Charlie Randall wrote:
Built in Function Question?

Does anyone have an example of how the %mseconds BIF works.  I checked
the archive and did not find an example nor have I had any success
with
a example from the web.  I have tried this and just cannot get away
from
one or both of these errors:

*RNF0579 20      1 The parameter for the duration built-in function is
not
                   valid.
*RNF7416 30      1 The types of the right and left hand side do not
match in the EVAL operation.

Thanks;

Charlie Randall
AAA Cooper Transportation
Crandall@xxxxxxxxxxxxx




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.