• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!



Active Member
I have been trying to get the business function to work that will cause my UBE to wait for a specified number of seconds.

I have tried the Time to Sleep and the Wait x Seconds. It seems that it just passes over the statement.

Has anyone used either one of these functions and could help me with what I should be passing to the function to make it wait for a number of seconds?



Well Known Member
Hi Roger,

Try using "Sleep Time" in module B98825. It has only one parameter which is the delay in milliseconds. So 1000 is 1 second, 60000 is 60 seconds etc. I haven't looked at the functions you named but maybe these are expecting milliseconds too, so they do pause but only for a fraction of the time you thought, as it was in seconds.



OW B733.2, SP 11.1
Sun Solaris/UNIX


Active Member

Depending on your platform the syntax of the sleep command will be Sleep(milliseconds) for NT or sleep(seconds) for AIX (+ possibly others). The code below should compile on any platform.

int iTime = 5;

#if _WIN32
/* running windows */
Sleep(iTime * 1000);
/* not running windows */

You could use the MathNumericToInt API to populate you iTime variable.

B7332 SP15.1. NT/AIX. Oracle 8.1.6


Reputable Poster
In xe Time to Sleep and Wait x Seconds are client only functions. Sleep
Time (B98825) only works on NT servers. I would create my own business
function, copying the code from Wait x Seconds (which works on NTs and
AS400s...not sure about others), build it and deploy to your server.



Active Member
I am using the AS/400 as the server and I can't get any of them to work.


B7333 SP13 AS/400 Data Server