Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reload qvw to execute macro for csv export using .bat file

Hi all

I am trying to do a simple expect of a table into a csv file. This extract needs to be done on reloading the QVW. Having read through the other posts I know that publisher requires the QVW to be reloaded via a .bat file as the macro will not run in the normal task execution.

I have done the following:

1. Created the macro and tested the macro by executing it in the QVW - all works fine and the csv file is created as required. I have also manually refreshed the QVW and the macro executes, creating the csv file. As mentioned this does not happen when the QVW is refreshed in the tasks section of the QEMC.

2. I have created the .bat file to reload the qvw and it is as follows:

          "C\Program files\Qlikview\QV.exe" /r "E:\QlikView\Applications\Production\dashboards\Home Dashboard v2\FE Home Dashboard v2b  NTNAME.qvw"

          Exit

On running this using command prompt as an administrator I would expect it to reload the above QVW - would I see this process showing in the tasks page of the QEMC? There are no error messages when I run it - both by executing it via command prompt and double clicking the .bat file.

3. The task to reload the dashboard does seem to run on completion of the tasked/scheduled reload and the log file reads as follows - not the warning:

    

(2013-05-17 10:10:35) Information: Executing ClusterID=1, QDSID=2e751242-807c-3a9e-bda0-c69c3ded9530 QDSMain.ExternalProgramTask

(2013-05-17 10:10:35) Information: Starting task "macro_export" (Attempt 1 of 1)

(2013-05-17 10:10:35) Information: Max run time: 1.00:00:00

(2013-05-17 10:10:35) Information: Executing E:\bat\matterspace.bat

(2013-05-17 10:10:35) Information: Executing commandline: "E:\bat\matterspace.bat" in folder "E:\bat".

(2013-05-17 10:10:35) Warning: Process exited with non zero exit code: 3 at 17/05/2013 10:10:35

(2013-05-17 10:10:35) Information: Process exited with exit code: 3 at 17/05/2013 10:10:35

(2013-05-17 10:10:35) Warning: The task "macro_export" finished with warnings. WarningCount=1

Can anyone please assist me on the above issue?

For info: We have publisher and the version I am using is QV10

Many thanks

Scott

5 Replies
marcus_sommer

Use the parameter /l instead /r

http://community.qlik.com/message/296469#296469

- Marcus

Not applicable
Author

Thanks Marcus - i have tried running the bat file using the command prompt with both /l and /r and both cases nothing seems to happen. Am i correct in saying that if the .bat file runs then I should see the reload in the task list of the QEMC?

Thanks

Scott

marcus_sommer

I don't use publisher or server for tasks, I use windows scheduler and that works fine. I think you could not see a reload in the task list, because you start a batch an not a reload.

In your case it could be that the server-user had not the proper access rights for the qvw.

- Marcus

Not applicable
Author

Thanks Marcus - the issue was with my script with the batch file. I was missing the ':' after the C.

I can now run the batch file and it opens my QVW when using the command prompt. The new issue I have now is running this using the command line on the QV Server the task hangs - the status says running and no log file is generated...

Very frustrating!

Bill_Britt
Former Employee
Former Employee

Hi,

Error code 3 is a Syntax Error.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.