• 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!

RUNUBE sequentially

KathyElux

Member
Dear List

We have written interfaces to and from OneWorld in RPGLE on an AS400. We "Submit" the RUNUBE command from within a CL to run the OneWorld UBEs.
In some cases there is a requirement to run a number of different UBEs sequentially. ie. the first must finish before the next one starts. Apart from putting a delay into the CL (which would not be ideal), is there any way of monitoring that the UBE has completed before kicking off the next UBE?

OneWorld is on SP16 Revisions 0.
 

dhelsley

Well Known Member
In unix there are two ways to do this.

- Use the "Batch" option of RUNUBE to submit the job to a singlethreaded queue.

- Use the "Interactive" option and list the jobs one after another in the same script. (Also making sure that the job runs in the context of the current process.) This has the advantage of being able to check the completion status of each UBE. It is not, however, single threaded.

I imagine that the same are available to you on the AS400.


David D. Helsley, Inc.
Independent IT Consultant
ddh@consultant.com
 

milliron

Active Member
Kathy,

As I understand it, you're doing a
SBMJOB CMD(RUNUBE...
from within your CL. I suggest just doing a RUNUBE... in the CL. That way each step will process when the previous one has finished.


XE SP15.1 AS/400 V4R5 DB2/400
 

SSAJAROFF92

Reputable Poster
Kathy :

You just need to submit them to a single thread queue.
On the JDE.INI ([NETWORK QUEUE SETTINGS] section) you define your
queues to be either singlethreaded or multithreaded.
If a queue, such as QBATCH appears only once on the [NETWORK QUEUE
SETTINGS], then it's singlethreadead; else it's multithreaded.
When you submit two or more UBEs to a singlethreaded queue, they're
processed sequentially.

Sebastian
 
In unix there are two ways to do this.

- Use the "Batch" option of RUNUBE to submit the job to a singlethreaded
queue.

- Use the "Interactive" option and list the jobs one after another in the same
script. (Also making sure that the job runs in the context of the current
process.) This has the advantage of being able to check the completion status
of each UBE. It is not, however, single threaded.

I imagine that the same are available to you on the AS400.


David D. Helsley, Inc.
Independent IT Consultant
ddh@consultant.com
 
Top