Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rupaliqlik
Creator
Creator

script failed and their reason should capture

Hi experts,

          I have a requirement where I will load all server logs like (qvd extractor document logs).If my script execution is failed then I wil create flag Script_Failed ='Y' else N.If flag Y then I want to fetch the error like syantax error or anything .But if it is  succsful then null.

    Script failed       Header 2
Sctipt FailedError
Ysysntax error
N
YUnknown statement
N

Regards,

Rupali Ethape.

kaushik.solankistalwar1hicvatr841029

4 Replies
tresesco
MVP
MVP

You could try like:

Set ErrorMode=0;


<Your Script here>

Load

          If(Len('$(ScriptError)')=0, 'N', 'Y') as [Script failed],

          '$(ScriptError)' as Header2

AutoGenerate 1 ;

rupaliqlik
Creator
Creator
Author

Hi Tresesco B ,


          My main concern is that how to load log file and captur error .I want to write a script.How to write a script to capture error flag?

Anil_Babu_Samineni

Difficult to load your log files into Qlik platform. Instead, We have tools to understand where that error occurs. Moreover, We can skip that error using SET ErrorMode = 0

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The free Script Log Analyzer tool

Qlikview Cookbook: Script Log Analyzer http://qlikviewcookbook.com/recipes/download-info/script-log-analyzer/

loads logs and flags those that are failing.  You could use that as a base, Should be easy enough to update to capture some error reasons by looking for "Error:" in the script text.

You might also consider a different approach and read the C:\ProgramData\QlikTech\DistributionService\TaskResults files instead.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

http://www.easyqlik.com