Check each RPG/400 program in batch job

265 pts.
Tags:
AS/400 batch jobs
RPG/400
I have a few programs to submit in batch but I need to check each program sucessfully then I need to call another program.
ASKED: April 16, 2009  3:05 PM
UPDATED: August 23, 2013  3:15 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

Call each program with a parameter, in each program set the parameter to indicate whether the program is successful or not, check the parameter after the program has run, if it’s successful proceed to the next program, otherwise stop or send a message etc.

Regards,

Martin Gilbert.

////////////////////////////
Or a data area. Job1 clears the data area when it starts, when it ends successfully it writes it’s name into the data area. Job2 checks to see that just the name of job1 is in the data area. When it ends it writes it’s name into position 11 of the data area. etc.

Phil

////////////////////////////

If you’ve got a process that’s sitting, waiting for previous, submitted-to-batch, processes to complete, I’d suggest a data queue instead. That way, your waiting process can suspend on the queue, awaiting word from the batch jobs & once it collects successful outcomes from them, it proceeds to do its thing.

Let me know if you help with the data queue puts and gets – very easy to set up & quite efficient.

Jim

==================

Hi,

If this is just about a few programs that need to run sequentially (one after another), then the simplest way is still going to be to have one CL program which calls program A with a parameter, then checks the parameter before calling program B with the same parameter, then checks the parameter before calling program C with the same parameter, etc.

Regards,

Martin Gilbert.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following