Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
gcharlesworth
New Contributor II

Do while loop stalling out after condition is met

Hi all - 

Can anyone please tell me why my script seems to be stalling after this Do While loop is complete? My loop is trying to load and concatenate multiple large QVDs from the name range of 2016 to 2019 (each QVD is named "_201*".

The script loads each QVD based on my conditions correctly, but after it loads the 2019 file, the script just stalls and freezes up. I have debugged this several times each time it sames the script has finished, but everything stalls

Are the tables not automatically concatenating thus creating synthetic keys? Any help on this would be greatly appreciated. I have attached a log file as well.

Do loop.PNGDo loop debug.PNG

1 Solution

Accepted Solutions
pradosh_thakur
Honored Contributor II

Re: Do while loop stalling out after condition is met

Can you load data from your 2016 qvd and 2017 qvd and compare the fields. May be they are different that's why 2016 and 2017 are not concatenating and other are getting concatenated. I think the while loop is fine. Please do a cross check and check the case sensitivity as well..
Learning never stops.
4 Replies

Re: Do while loop stalling out after condition is met

Is it possible you have another table in your app before this with the repeating fields and it is trying to create a synthetic key?

pradosh_thakur
Honored Contributor II

Re: Do while loop stalling out after condition is met

Can you load data from your 2016 qvd and 2017 qvd and compare the fields. May be they are different that's why 2016 and 2017 are not concatenating and other are getting concatenated. I think the while loop is fine. Please do a cross check and check the case sensitivity as well..
Learning never stops.
Partner
Partner

Re: Do while loop stalling out after condition is met

I suggest doing a debug and limited load to diagnose whats happening.
I suspect it may not be concatenating. if so force concatenation using one of the techniques mentioned in link below

https://community.qlik.com/t5/QlikView-Scripting/Create-Empty-Table-for-a-Looping-Load/td-p/1087311
gcharlesworth
New Contributor II

Re: Do while loop stalling out after condition is met

Hi Pradosh - 

This was the correct solution. I forgot that my ID key field was not added until 2017 on and that in previous applications I always hard-code the field names that I need.  Adding the specific field names and omitting "ID" let the table concatenate properly and the script ran through successfully. Good catch, thanks!

Gary