Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
I've this LOAD instruction in a script, normally it work fine
File:
LOAD *
FROM
File.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
... but when the input file is empty I get this error
Error: File extdata.cpp, Line xxxx
The input file is generated by an external app and is not possible to get the header columns without records.
Is there any way to check if the file is empty before the load sentence, or a method/sentence/prefix to avoid this error??
Thank you.
Joaquín
Try FileSize().
Try FileSize().
In the script write
set ErrorMode=0;
hope it helps
You can use
NoOfRows() and Errormode function.
The answer that best suits to my problem was suggested by tresesco
myFile='file.csv'
vSize = FileSile(myFile)
if vSize = 0 then
else
endif
Thank you for all suggestions