Qlik Community

QlikView Administration

Discussion Board for collaboration on QlikView Management.

Announcements
Coming Aug. 9: New Simplified Authoring for Qlik Sense SaaS – For Details, CLICK HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
manuelj_serrano
Contributor III
Contributor III

Gobernance Dashboard error: The control statement is not correctly matched with its corresponding start statement

Hello,

I´m using Gobernance Dashboar 2.1.4 in qlikview versión April 2020 SR3.  

The execution worked correctly until it suddenly stopped working. The error that appears is as follows:

next fldr
20211215T220031.200+0100 0623 IF NumExclusions > 0 THEN
20211215T220031.227+0100 Error: The control statement is not correctly matched with its corresponding start statement
20211215T220031.235+0100 Execution Failed
20211215T220031.237+0100 Execution finished.

The only tab that has a script that says "IF NumExclusions > 0 THEN" is the fileScan tab.

This is the script:

// Just looking for qvws, qvds for the file scan; QVX scan is not supported in GovDB 2.x
For Each Ext in 'qvw','qvd'
FOR EACH File in filelist ('$(root)' & '\*.'&Ext)
IF NumExclusions > 0 THEN
set exclusionsFound = 0;
For x = 0 to $(NumExclusions)-1
let exclusionsFound = exclusionsFound + SubStringCount(lower('$(File)'),'$(exclusion$(x))');
Next x
If exclusionsFound > 0 then
LET trace_File = $(f_cleanse_fname('$(File)')); // GOVDASH-190
let msg = 'The file $(trace_File) has been excluded from this scan due to user defined exclusion parameter.';
TRACE $(msg);
ExcludedFiles:
Load '$(File)' as ExcludedFile, $(exclusionsFound) as ExclusionRulesFound Autogenerate 1; // Generate a table of excluded files
ELSE
CALL fileList ('$(File)','File',Ext,$(n))
ENDIF
//next x
ELSE
CALL fileList ('$(File)','File',Ext,$(n))
ENDIF
NEXT File
NEXT Ext

for each fldr in DirList('$(root)'&'\*')

IF NumExclusions > 0 THEN
set exclusionsFound = 0;
For x = 0 to $(NumExclusions)-1
let exclusionsFound = exclusionsFound + SubStringCount(lower('$(fldr)'),'$(exclusion$(x))');
Next x

IF exclusionsFound > 0 then
LET trace_fldr = $(f_cleanse_fname('$(fldr)')); // GOVDASH-190
let msg = 'The folder $(trace_fldr) has been excluded from this scan due to user defined exclusion parameter.';
TRACE $(msg);
ExcludedFiles:
Load '$(fldr)' as ExcludedFile, $(exclusionsFound) as ExclusionRulesFound Autogenerate 1; // Generate a table of excluded files
ELSE
Concatenate (FilePaths)
Load '$(fldr)' as %FilePath, RowNo() as %FilePathNumber autogenerate(1);

CALL fileSearch ('$(fldr)',$(n))
ENDIF

ELSE
Concatenate (FilePaths)
Load '$(fldr)' as %FilePath, RowNo() as %FilePathNumber autogenerate(1);

CALL fileSearch ('$(fldr)',$(n))

ENDIF

next fldr

ENDSUB

 

Can you help me?

Thanks

Labels (1)
2 Replies
Maria_Halley
Support
Support

manuelj_serrano
Contributor III
Contributor III
Author

Hi Maria,
Thank you for your reply.
The article you propose is old, from 2019, and the dashboard has been working correctly until now. I have no special characters in the file names, except for some underscore, but this has always worked.