That would depend on how you name subprocedures:
/free
ipcHandle = initInterProcessComm();
... Submit asynchronous process ....
completionStatus = waitForIPCCompletion(ipcHandle, timeout);
/end-free
This would work any time you need to submit an asynchronous procedure and wait for it to finish. You
don't need to worry about how long to wait, it would just wait until the async job was complete. Of
course the async job would have to call sendIPCComplete(ipcHandle), or potentially
sendIPCError(ipcHandle).
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David Gibbs
Sent: Thursday, July 24, 2008 11:39 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Time Delay RPG IV
Murphy, Mark wrote:
Alternately you could use data queues to do this, and the RPG will
wait exactly until the asynchronous process is finished.
That seems to be a pretty round about way to get a delay. It can also cause confusion ... as someone
else who's looking at the code might think the data queue is supposed to actually supply data,
Calling sleep() or DLYJOB makes a lot more sense to me.
david