- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tracking an Error
Hi Friends,
I have following data load script in my QV file. This runs perfectly. But I am unable to track the error in file correctly with insufficent details such as file name. Also I want to show the file name that is being run during the script execution. Kindly help me me solve those issues please.
Set ErrorMode = 0;
For each vFileName in Filelist ('Z:\CLAIMS_NEW_2020\MAY\??CLMMAY.xlsx')
Data:
LOAD 0 as dummy AutoGenerate 0;
Concatenate (Data)
LOAD *
FROM
$(vFileName)
(ooxml, embedded labels, table is Sheet1);
Next vFileName;
DROP FIELD dummy;
ErrorList:
First 1 Load
Date(today(),'YYYYMMDD') As ExecuteDate,
FileName() As FileName,
'$(ScriptErrorCount)' As Error_Seq,
'$(ScriptError)' As ErrorName,
'$(ScriptErrorDetails)' As ErrorDetail
AutoGenerate 1;
error log file
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess you should use:
Date(today(),'YYYYMMDD') As ExecuteDate,
'$(vFileName)' As FileName,
'$(ScriptErrorCount)' As Error_Seq,
'$(ScriptError)' As ErrorName,
'$(ScriptErrorDetails)' As ErrorDetail
AutoGenerate 1;
To see the files in which the error occurred in the logs you have to use:
Set ErrorMode = 0;
For each vFileName in Filelist ('Z:\CLAIMS_NEW_2020\MAY\??CLMMAY.xlsx')
TRACE '$(vFileName)';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess you should use:
Date(today(),'YYYYMMDD') As ExecuteDate,
'$(vFileName)' As FileName,
'$(ScriptErrorCount)' As Error_Seq,
'$(ScriptError)' As ErrorName,
'$(ScriptErrorDetails)' As ErrorDetail
AutoGenerate 1;
To see the files in which the error occurred in the logs you have to use:
Set ErrorMode = 0;
For each vFileName in Filelist ('Z:\CLAIMS_NEW_2020\MAY\??CLMMAY.xlsx')
TRACE '$(vFileName)';