Discussion Board for collaboration related to QlikView App Development.
Hello
Hoping someone can help. I am having a problem when trying to reload a document using the QMC. If I reload the document on my local desktop it works fine. I moved the document to the server and opened it through the desktop and it reloaded with no problems. However as soon as I try to reload via the QMC I get a General Script Error.
The document is using the wildcardmapping document taken from Rob Wunderlich's Cookbook. I have adapted the wildmap table to my specific needs and am mapping to a qvd located on the server (paths to the qvd are correct)
The error in the log file is below, which doesnt make sense to me as the script works fine when reloading on desktop
Error: Error in expression:
')' expected
General Script Error
Any help would be greatly appreciated
Peter, thanks for your suggestion. I tried what you suggested but that didnt work, however it got me thinking about characters in the tables. It turns out that in my inline table , one of the fields contained an apostrophe. Taking this out made it run fine in QMC. never really thought about that being an issue as it ran fine with the apostrophe outside of QMC.
Thanks again.
Duncan
Difficult to comment on, if you don't post at least the offending part of your script.
Are you using $-sign substitution somewhere?
Peter
Peter, thanks for looking to assist. Slight cut down version of the log file below
Execution started.
1/16/2014 2:23:39 PM: QlikView Version:11.20.12018.0
1/16/2014 2:23:39 PM: CPU Target x64
1/16/2014 2:23:39 PM: Operating System Windows Server 2008 R2 Enterprise Service Pack 1 (64 bit edition)
1/16/2014 2:23:39 PM: Wow64 mode Not using Wow64
1/16/2014 2:23:39 PM: MDAC Version 6.1.7601.17514
1/16/2014 2:23:39 PM: MDAC Full Install Version 6.1.7601.17514
1/16/2014 2:23:39 PM: PreferredCompression 2
1/16/2014 2:23:39 PM: EnableParallelReload 1
1/16/2014 2:23:39 PM: ParallelizeQvdLoads 1
1/16/2014 2:23:39 PM: AutoSaveAfterReload 0
1/16/2014 2:23:39 PM: BackupBeforeReload 0
1/16/2014 2:23:39 PM: EnableFlushLog 0
1/16/2014 2:23:39 PM: SaveInfoWhenSavingFile 0
1/16/2014 2:23:39 PM: UserLogfileCharset 1200
1/16/2014 2:23:39 PM: OdbcLoginTimeout -1
1/16/2014 2:23:39 PM: OdbcConnectionTimeout -1
1/16/2014 2:23:39 PM: ScriptWantsDbWrite false
1/16/2014 2:23:39 PM: ScriptWantsExe false
1/16/2014 2:23:39 PM: LogFile CodePage Used: 1200
1/16/2014 2:23:39 PM: Reload Executed By CUKWPRC001\Manoj.Krishnamoorthy
1/16/2014 2:23:39 PM: Process Executing: QVB
1/16/2014 2:23:39 PM: Process ID: 3844
1/16/2014 2:23:39 PM: 0002 SET ThousandSep=','
1/16/2014 2:23:39 PM: 0003 SET DecimalSep='.'
1/16/2014 2:23:39 PM: 0004 SET MoneyThousandSep=','
1/16/2014 2:23:39 PM: 0005 SET MoneyDecimalSep='.'
1/16/2014 2:23:39 PM: 0006 SET MoneyFormat='$#,##0.00;($#,##0.00)'
1/16/2014 2:23:39 PM: 0007 SET TimeFormat='h:mm:ss TT'
1/16/2014 2:23:39 PM: 0008 SET DateFormat='M/D/YYYY'
1/16/2014 2:23:39 PM: 0009 SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT'
1/16/2014 2:23:39 PM: 0010 SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec'
1/16/2014 2:23:39 PM: 0011 SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun'
1/16/2014 2:23:39 PM: 0180 wildmap:
1/16/2014 2:23:39 PM: 0181 LOAD * INLINE [
1/16/2014 2:23:39 PM: 0182 Key, Label
1/16/2014 2:23:39 PM: 0183 *theft of lead* , Lead
1/16/2014 2:23:39 PM: 0280 * , Other
1/16/2014 2:23:39 PM: 0281 ]
1/16/2014 2:23:39 PM: 2 fields found: Key, Label, 87 lines fetched
1/16/2014 2:23:39 PM: 0297 SET vMapKey=
1/16/2014 2:23:39 PM: 0298 SET vMapLabel=
1/16/2014 2:23:39 PM: 0299 SET comma=
1/16/2014 2:23:39 PM: 0300 SET esc = chr(01)
1/16/2014 2:23:39 PM: 0303 FOR i = 0 to NoOfRows('wildmap')-1
1/16/2014 2:23:39 PM: 0304 LET vMapKey = vMapKey & comma & chr(01) & peek('Key', i, 'wildmap') & chr(01)
1/16/2014 2:23:39 PM: 0305 LET vMapLabel = vMapLabel & comma & chr(01) & peek('Label', i, 'wildmap') & chr(01)
1/16/2014 2:23:39 PM: 0306 SET comma = ','
1/16/2014 2:23:39 PM: 0307 NEXT i
1/16/2014 2:23:39 PM: 0304 LET vMapKey = vMapKey & comma & chr(01) & peek('Key', i, 'wildmap') & chr(01)
1/16/2014 2:23:39 PM: 0305 LET vMapLabel = vMapLabel & comma & chr(01) & peek('Label', i, 'wildmap') & chr(01)
1/16/2014 2:23:39 PM: 0306 SET comma = ','
NEXT i
1/16/2014 2:23:39 PM: 0309 SET i=
1/16/2014 2:23:39 PM: 0310 SET comma=
1/16/2014 2:23:39 PM: 0315 LET vMapExpr = replace('pick(wildMatch($1, *theft of lead* , * ), Lead , Other )', chr(01), chr(39))
1/16/2014 2:23:39 PM: 0316 SET vMapKey=
1/16/2014 2:23:39 PM: 0317 SET vMapLabel=
1/16/2014 2:23:39 PM: 0318 SET esc=
1/16/2014 2:23:39 PM: 0324 Orders:
1/16/2014 2:23:39 PM: 0325 LOAD *, pick(wildMatch(Claim_Circumstances,'*theft of lead*','*'), 'Lead','Other') as PartGroup
1/16/2014 2:23:39 PM: 0326 ;
1/16/2014 2:23:39 PM: 0327 LOAD claim_id,
1/16/2014 2:23:39 PM: 0328 [LOB Cause of Loss],
1/16/2014 2:23:39 PM: 0329 [FNOL Type of Loss],
1/16/2014 2:23:39 PM: 0330 [Cohort Claim Indicator],
1/16/2014 2:23:39 PM: 0331 [Claim Closure Reason],
1/16/2014 2:23:39 PM: 0332 [Claim Secondary Closure Reason],
1/16/2014 2:23:39 PM: 0333 [Claim Type],
1/16/2014 2:23:39 PM: 0334 [Notifier Type],
1/16/2014 2:23:39 PM: 0335 [Catastrophe Indicator],
1/16/2014 2:23:39 PM: 0336 [Claim Incident Excess],
1/16/2014 2:23:39 PM: 0337 Circumstances,
1/16/2014 2:23:39 PM: 0338 [Loss Location Description],
1/16/2014 2:23:39 PM: 0339 Postcode,
1/16/2014 2:23:39 PM: 0340 Location,
1/16/2014 2:23:39 PM: 0341 [Claim Circumstances],
1/16/2014 2:23:39 PM: 0342 [Claim Closed Date],
1/16/2014 2:23:39 PM: 0343 [Claim Closed Y/N],
1/16/2014 2:23:39 PM: 0344 Claim_Circumstances
1/16/2014 2:23:39 PM: 0345 FROM
1/16/2014 2:23:39 PM: 0346 [\\10.97.240.11\qvdata\Development\UKU\QVD\New\Stage 2\ClaimCirc2.qvd]
1/16/2014 2:23:39 PM: 0347 (qvd)
1/16/2014 2:23:39 PM: Error: Error in expression:
1/16/2014 2:23:39 PM: ')' expected
1/16/2014 2:23:39 PM: General Script Error
1/16/2014 2:23:39 PM: Execution Failed
1/16/2014 2:23:39 PM: Execution finished.
The error doesnt occur when I load via desktop and loading the qvd works when taking out the preceding load (shown below)
Orders:
LOAD *, $(vMapExpr(Claim_Circumstances)) as PartGroup
;
LOAD claim_id,
[LOB Cause of Loss],
[FNOL Type of Loss],
[Cohort Claim Indicator],
[Claim Closure Reason],
[Claim Secondary Closure Reason],
[Claim Type],
[Notifier Type],
[Catastrophe Indicator],
[Claim Incident Excess],
Circumstances,
[Loss Location Description],
Postcode,
Location,
[Claim Circumstances],
[Claim Closed Date],
[Claim Closed Y/N],
Claim_Circumstances
FROM
[\\10.97.240.11\qvdata\Development\UKU\QVD\New\Stage 2\ClaimCirc2.qvd]
(qvd);
1/16/2014 2:23:39 PM: 0345 FROM
1/16/2014 2:23:39 PM: 0346 [\\10.97.240.11\qvdata\Development\UKU\QVD\New\Stage 2\ClaimCirc2.qvd]
1/16/2014 2:23:39 PM: 0347 (qvd)
see this last 5 line it must be some where here only i dont know excatly (qvd); for my eyes semi colon is missing srry if its wrong
nizam, thanks for response. The semi colon is there and if I take away the preceding load it works fine reloading from QMC wit hte script as is. Also, even with the script as it is , it loads fine reloading from desktop. Its been bugging me for days so far!
Orders:
1/16/2014 2:23:39 PM: 0325 LOAD *, pick(wildMatch(Claim_Circumstances,'*theft of lead*','*'), 'Lead','Other') as PartGroup
1/16/2014 2:23:39 PM: 0326 ;
1/16/2014 2:23:39 PM: 0327 LOAD claim_id,
1/16/2014 2:23:39 PM: 0328 [LOB Cause of Loss],
1/16/2014 2:23:39 PM: 0329 [FNOL Type of Loss],
1/16/2014 2:23:39 PM: 0330 [Cohort Claim Indicator],
1/16/2014 2:23:39 PM: 0331 [Claim Closure Reason],
1/16/2014 2:23:39 PM: 0332 [Claim Secondary Closure Reason],
1/16/2014 2:23:39 PM: 0333 [Claim Type],
1/16/2014 2:23:39 PM: 0334 [Notifier Type],
1/16/2014 2:23:39 PM: 0335 [Catastrophe Indicator],
1/16/2014 2:23:39 PM: 0336 [Claim Incident Excess],
1/16/2014 2:23:39 PM: 0337 Circumstances,
1/16/2014 2:23:39 PM: 0338 [Loss Location Description],
1/16/2014 2:23:39 PM: 0339 Postcode,
1/16/2014 2:23:39 PM: 0340 Location,
1/16/2014 2:23:39 PM: 0341 [Claim Circumstances],
1/16/2014 2:23:39 PM: 0342 [Claim Closed Date],
1/16/2014 2:23:39 PM: 0343 [Claim Closed Y/N],
1/16/2014 2:23:39 PM: 0344 Claim_Circumstances
1/16/2014 2:23:39 PM: 0345 FROM
1/16/2014 2:23:39 PM: 0346 [\\10.97.240.11\qvdata\Development\UKU\QVD\New\Stage 2\ClaimCirc2.qvd]
1/16/2014 2:23:39 PM: 0347 (qvd)
1/16/2014 2:23:39 PM: Error: Error in expression:
1/16/2014 2:23:39 PM: ')' expected
1/16/2014 2:23:39 PM: General Script Error
1/16/2014 2:23:39 PM: Execution Failed
1/16/2014 2:23:39 PM: Execution finished.
comment all the table except this table and preceding load
Duncan,
The difference between your reload and QMC reload is that you're reloading as yourself as Windows user, while QMC is reloading as QV service user. I suspect that the service account doesn't have access to the network location
\\10.97.240.11\qvdata\Development\UKU\QVD\New\Stage 2\ClaimCirc2.qvd
Regards,
Michael
the only parts in the script are the inline table and variable creation (together they make the variable used in the preceding load as per Robs cookbook) then load the table above with preceding load. If I take out the parts before this table it will error out as this part creates the variable used in the preceding load.
I have attached Robs original document which shows the flow of the script and I have just changed the inline table and the final table to which its mapped to.
Michael
I have other documents that load fine using QMC and even this one reloads okay through QMC if I take out the preceding load. So its something to do with the preceding load, but I dont know what as it works fine outside of QMC!!
I tried your application, and it reloads fine in my test Server. Didn't remove the preceding load.
I'm using 11.20 SR5.