5 pts.
 AS400 RPGLE Lock wait on multythreaded jobs
I have 40 threads of the same program that I am submitting. The jobs go into and out off lckw status to fast to see the reason but this slows the process down How do I find the problem.

Software/Hardware used:
ASKED: May 3, 2010  11:31 AM
UPDATED: May 11, 2010  1:48 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Can you clarify your circumstances? Do you have an ILE RPG program that is attempting to handle 40 threads? Or do you have a job that spawns 40 threads and each thread calls your ILE RPG program?

Is your program compiled with the THREAD(*SERIALIZE) control specification? I would normally assume that it was, but I have to ask.

Tom

 107,695 pts.

 

Note that a serialized RPG program enforces serialization in multi-threaded jobs by way of a mutex. Locks will come and go as different threads might attempt to call the program. Only one thread will succeed at any given time.

If the locks are not due to serialization, then others are possible. However, with no clarification of how your process runs, there is no way to answer. If you don’t describe it, we can only assume that you aren’t interested in an answer.

Tom

 107,695 pts.