How do you account for running multiple programs and an occurs?

rip73

New Member
Hi,

I have a problem that needs to be corrected ASAP if possible.

We run a series of programs that extract data. The code looks something like this

run <program1> no-error.
run <program2> no-error.
run <program3> no-error.
run <program4> no-error.
run <program5> no-error.

If one of the programs has an error, say the run of <program2> the remaining programs do not execute.

Do you know of a way to run programs sequentially but be able to proceed through the entire list even if one of the program does errror?

thanks
 

TomBascom

Curmudgeon
1) "no-error" is not doing what you think it is doing.

2) you need to study:

Code:
do on error undo, retry:
  run program1.
end.

And the ilk.
 

tamhas

ProgressTalk.com Sponsor
And, to be more clear, you need to wrap each call with error handling for that call. It seems likely that, if you encounter and error, you don't simply want to proceed without taking any notice. At a minimum you should be logging the error and there is a good chance that you want to check the type of error and decide whether to proceed or not on that basis. You don't mention a version, but with luck you are on a recent enough version to have the new block structured error handling. If so, there is a whole manual on the subject.
 
Top