I have created a CL program that submits(SBMJOB command) a batch job in a user defined subsystem. There's a performance issue in the batch job execution -- the job performs its tasks slowly. But when I call the program interactively from the CL program (CALL command the job works fine and ends quickly, performing its tasks. I'm trying to think of a solution to execute that job in a separate process with a call command from my CL program. Is there a way I can do this? I'm restricted to using the spawn command due to some technical reasons.
Submitting a batch process is the right thing to do, especially since IBM has put such a heavy price on interactive performance. Instead of running your job interactively, I would suggest you investigate why the batch process runs so much slower. Unless your machine is close to being maxed out on performance, the cause is most likely something simple. Here are a few things to check.
1. Are there other batch jobs running at a higher priority that is causing your job to run slow? If so, then you may want to raise the priority of your job to meet or exceed the other jobs running in batch.
2. Are you submitting this to a job queue that only allows one active job at a time? If so, then the delay is in waiting for the job to start running in batch and you may want to look at using a different job queue or raising the amount of active jobs for the job queue.
3. If there are other jobs running in your user-defined subsystem, then check the activity level on the storage pool that your batch subsystem is using. You can see/change this by doing a WRKSYSSTS. It could be that your job is becoming ineligible because of the activity level.
Unless your system is maxed out on performance, then chances are that one of these three things will solve your slowness problem in batch.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.