wait for few seconds or minutes logic in db2 native sp

64 views Asked by At

I want to implement logic to wait for a few seconds for the initial native DB2 SP to complete and then start the second native DB2 SP.

The wait logic is needed because SP1 will insert data, and then Sp2 will select the data.

CALL QCMDEXC('DLYJOB DLY(1)', 13);

1

There are 1 answers

2
Charles On

Judging from the use of DLYJOB You appear to be using Db2 for IBM i...

What you have should do what you request. But I don't understand why you think you need it.

Assuming you are simply doing

call MyStoredProc1;
call MyStoredProc2;

There no need for a delay, Proc2 won't be called before Proc1 finishes.