RESOLVED: delay or async for RUP, or call SM from RUP
Posted: Thu Oct 23, 2025 5:43 am
I hope I am just missing something simple here, and just being think headed about this.
I have a RUP that is ran from a submitted job on the IBM i (from the job scheduler), that is doing various file and job cleanup functions at the end of the business day.
In a new routine in the RUP, and am reading a file to select specific records.
As I read the record from this file (select fields), I need to call another RUP or SM to perform some other external transaction processing using the field values.
The challenge is that this external transaction processing takes a few seconds or more, but this delay is causing a crash as the SELECT is already continuing on before the return of the initial external transaction process.
#1 - Is there syntax to call a Server Module (xxx.ExecuteAsync) from within a RUP?
#2 - Or is there syntax to call another RUP in async mode so that the original RUP routine SELECT will be held until the called RUP completes?
#3 - or is there a means to build in a pause or delay within a SELECT statement?
I have a RUP that is ran from a submitted job on the IBM i (from the job scheduler), that is doing various file and job cleanup functions at the end of the business day.
In a new routine in the RUP, and am reading a file to select specific records.
As I read the record from this file (select fields), I need to call another RUP or SM to perform some other external transaction processing using the field values.
The challenge is that this external transaction processing takes a few seconds or more, but this delay is causing a crash as the SELECT is already continuing on before the return of the initial external transaction process.
#1 - Is there syntax to call a Server Module (xxx.ExecuteAsync) from within a RUP?
#2 - Or is there syntax to call another RUP in async mode so that the original RUP routine SELECT will be held until the called RUP completes?
#3 - or is there a means to build in a pause or delay within a SELECT statement?