Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one scenario in my script like.
Load A,B,C from
SQL Select * from Table1
Store into ABC.QVD
Load E,F,G from
SQL Select * from Table2
Store into EFG.QVD
--------------------------------------
If our task is aborted from QMC or killed from backend(DB), I want to catch that situation and execute one SP
Actually we have our batch jobs which goes on hold if my QVD is getting refreshed and once done I'm executing one SP which tells us job is completed and release those batch jobs, but if the script fails (from QMC or killed from DB) I'm not able to execute my SP as execution is not going to that SP line.
See the video here: Error Trap | qlikcentral
one way would be is to read the Qlikview log file ...from this you will get the info about how the job got aborted
Hi Avinash,
Its not about the catching the error all I want is if my task fails(say any reason) one SP should be executed in that case.
Some thing like this
if ScriptError=0 then
sql execute SP,TaskName,F;
//no file;
end if
Hi Gybert, I do not want my script to wait and execute again, I just want if my script fails on any line it should simply execute one SP, so that my batch jobs which are on hold can start again.
e.g .
if ScriptError=0 then
sql execute SP,TaskName,F;
//no file;
end if
The point you should learn from the video is how to trap an error. What you do then is up to you. If you can find something better to do than retrying to load like in the video that's fine. You're not required to implement everything the videos shows literally and step for step. Get creative.
Hi Gysbert Thanks for your reply, I got your point actually I was not very clear whit my point , i was asking if someone goes and abort my QV task itself how can I handle that, if my session is getting killed i can handle that(by script code) but if task itself is getting killed we can not handle that as the script itself wont execute, correct?