Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Filepath declaration failing - cannot spot an error - plz help

Hi,

one of our primary data_loading_scripts reported an error with the declaration of a new file I have just introduced today: The dpt. has created a new file that has the exact same name as the old one but for the new year in the filename and is in the same place.

I have also declared it in exactly the same way, with - and _ in the respective places, brackets around the name because of these and with a closing semicolon.

I just cannot spot anything peculiar.

the old filepath_declaration, which worked and still works, is

>> v_Pfad_Basisdaten_WE_64_2015 = '[\servername\Common\101_Wareneingang\KPI\20150319-Daten_KPi_WE-2015.xlsm]'; <<

(with a SET before it, I just deleted it here to get the thing in one line)

The new declaration which doesn't work is

>> v_Pfad_Basisdaten_WE_64 _2016 = '[\servername\Common\101_Wareneingang\KPI\20150319-Daten_KPi_WE-2016.xlsm]'; <<

I still cannot spot any difference. The script aborted right when this declaration was executed, it didn't reach the actual LOADs.

Can you help me out here?

Thanks a lot!

Best regards,

DataNibbler

9 Replies
marcus_sommer

Hi DataNibbler,

mmmh, looked really the same ... maybe you tried it without the single-quotes or the square-brackets and if this not helped please post the original variable-statement, maybe there is any little syntax-issue.

- Marcus

datanibbler
Champion
Champion
Author

Hi Marcus,

thanks for trying to help - this is the original variable_declaration. I copied it just like I have it in the INCLUDE file. The brackets and quotes are all in place, aren't they?

My idea was that maybe the path_and_name is too long in total, so that QlikView doesn't consider the number at the end anymore - but that would probably lead to a different error, not to an outright failure of the declaration ...

Best regards,

DataNibbler

marcus_sommer

Hi DataNibbler,

if not already used change the include statement into must_include (The $(Include) which you $(Must_Include) into your toolkit) to get an error-message if the include-file couldn't be loaded and then I would look on this within the debugger - by include-files the debugger creates further script-tabs on the the debugger-window where you could better see what happens.

- Marcus

datanibbler
Champion
Champion
Author

I will try.

I'm pretty sure that that INCLUDE file can be loaded because there is another declaration (the one for the 2015 list) in there, and that seems to be okay. But I'll have a look in the debugger and report back here.

P.S.: OK, I'm now positively sure about that - the INCLUDE file is loaded properly, the declaration for the 2015 list works and the one for the 2016 list, albeit I copied the text from the 2015 declaration and merely adapted it, fails.

I'm at my wit's end. I'll just try shortening those variables - maybe QlikView really doesn't consider those last digits from the statement and so tries to fill the same value into two different variables; That should not pose a problem, but I can't think of anything else ...

P.P.S.: Nope - that doesn't change it. Still, the INCLUDE is loaded properly, the declaration for 2015 works - and the one for 2016 fails with an "error in script line". Strange ...

rajeshforqlikvi
Creator
Creator

While checking both are same or not it compare in the excel file as below

 

>> v_Pfad_Basisdaten_WE_64_2015 = '[\servername\Common\101_Wareneingang\KPI\20150319-Daten_KPi_WE-2015.xlsm]'; <<
>> v_Pfad_Basisdaten_WE_64 _2016 = '[\servername\Common\101_Wareneingang\KPI\20150319-Daten_KPi_WE-2016.xlsm]'; <<

FALSE

By using this this formula in the excel : =IF(F19=F20,TRUE,FALSE)

you please verify from your end might be some space will be there so that is showing both are not same.

Regards

Rajesh Kumar

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Just some additional tests:

  • Your post contains a NL in the middle of the assigned value. In your script the assignment appears on a single line?
  • Add a LET statement keyword in front of the 2016 assignment. Still a failure?
  • As an experiment (and to help you out as quickly as possible) change the line into a SET statement (by prefixing a SET keyword and optionally dropping the quotes.
  • Retype the assignment instead of copying from the 2015 definition.

Peter

datanibbler
Champion
Champion
Author

Hi Peter,

in the INCLUDE file (a txt file) the statement appears on a single line, yes.

There is a SET keyword in front - I just dropped that in my post because with that it got too long and there would have been a line_break in the statement which I didn't want. SET should be correct, no?

I will try retyping it from scratch since shortening it didn't make it better.

Thanks a lot!

Best regards,

DataNibbler

Peter_Cammaert
Partner - Champion III
Partner - Champion III

As an additional suggestion: in the include file, put the SET statement on the second line and put something else on the first (like a // comment).

Your problem may be caused by the way the $(INCLUDE=) spec interacts with what it is being replaced by. You can observe what is happening on an expansion level in the Document log.

Best,

Peter