CSVRead does not stop on missing input

Hello everyone,

when I try to read data from a csv file at execution time with

`executeTool ‘csvread myfile.csv id=myParameter index=1,2 values=3’;

GAMS does not stop with an error if the file (myfile.csv) does not exist. It just wirtes

Exception from Tool: File "myfile.csv" does not exist or cannot be read

to the log file. I find this silent failing very dangerous. Is there a way to either let CSVRead abort the execution, or test at execution time if the file exists?

Thank you for your help!

Hi,

you can use executeTool.checkErrorLevel '...' to check the errorlevel of this particular call (see documentation).

You might also be interested in command line parameter checkErrorLevel.

I hope this helps!

Hi Fred,

very helpful. Thank you!