Page 1 of 1

TI master process: continue after ExecuteProcess failure

Posted: Thu Apr 12, 2012 10:11 am
by kudzis
I have a nightly load process, which runs various other processes using ExecuteProcess(); problem is, if any of processes fail, it stops working and does not execute other processes. My nightly load process example:


ExecuteProcess ('export_klientu_planavimas_SQL');

ODBCOpen('cogsql2005', 'cognos', 'password');
ODBCOutput('cogsql2005', 'EXEC kgvp.pr_tm1_dim_create_klientai');

ExecuteProcess('does_not_exist');

ASCIIOutput('C:\process_return_value.txt', 'OK ', TIME, 'on', TODAY);

--------------------------------------------

this process will always fail on ExecuteProcess('does_not_exist'), but I want it to continue anyway and execute ASCIIOutput command. Is it possible? I would like universal solution, because in my production server nightly load process executes ~15 other processes.

Re: TI master process: continue after ExecuteProcess failure

Posted: Thu Apr 12, 2012 10:12 pm
by Steve Rowe
Unless you can trap the error and avoid the fatal error then you've no where to go.

So in the example you give which I assume is an example and not real you could test for the TI "Does Not Exist" with a Dimix against the }Process dimension and then chose to call it or not on the basis of the result of the Dimix test.
HTH

Re: TI master process: continue after ExecuteProcess failure

Posted: Fri Apr 13, 2012 7:02 am
by kudzis
I've put my nightly data load in multiple separate processes, then created a master chore and put all processes inside. This way, if an intermediate process fails chore continues to execute other processes.

The only problem is I can't write comments in chore so all data load logic is not that clear from first sight, but at least it works.

Re: TI master process: continue after ExecuteProcess failure

Posted: Fri Apr 13, 2012 10:53 am
by Steve Rowe
Good point and actually a genuine advantage of a chore over a sequence of ExecuteProcess commands.