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



Ok, that helps.

First, from the manual:
--------------------------------
%MSECONDS (Number of Microseconds)

%MSECONDS(number)
%MSECONDS converts a number into a duration that can be added to a time or 
timestamp value.


%MSECONDS can only be the right-hand value in an addition or subtraction 
operation. The left-hand value must be a time or timestamp. The result is a 
time or timestamp value with the appropriate number of microseconds added or 
subtracted. For a time, the resulting value is in *ISO format.
---------------------------------

In your program, you are trying to assign a duration value (the result of the 
%mseconds bif) to an alpha field.  These datatypes are not compatible.  A 
duration value may only be used in an expression dealing with date/time 
types.....  You cannot use this command in this manner.

You must explore the date/time types (d, t, z in RPGILE) before you can use the 
date/time duration bifs.....    

Can you tell me what you're trying to accomplish?

Thanks,

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-297-2863 or ext. 1863



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


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


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.