using csv2gdx and gdxin
Posted: Wed Jun 13, 2018 6:06 pm
Hi everyone,
I'm new to GAMS, and this is my first post.
I'm trying to import data from a CSV file. I have these 2 lines of code in my ".gms" file (let's call them line 1 and line 2 respectively):
execute 'csv2gdx i.csv output=in_i.gdx index=1 values=1 useheader=y id=i';
$gdxin in_i.gdx
I get a lot of errors, but I'll focus on the top-most one (most of the errors are 502 and 510):
*** Error 510 in [my directory name]
Unable to pen gdx file for $GDXIN
I also noticed that if I run the 2 lines in different files, then there are no issues (run line 1 in one "gms" file and then run line 2 in the next "gms" file).
Can anyone help me to understand this issue? I tried inserting a -sleep- command between the 2 lines (thinking that the second line was being run before the first was complete), but that didn't help. Does GAMS not run the scripts from top to bottom?
best,
Brian
I'm new to GAMS, and this is my first post.
I'm trying to import data from a CSV file. I have these 2 lines of code in my ".gms" file (let's call them line 1 and line 2 respectively):
execute 'csv2gdx i.csv output=in_i.gdx index=1 values=1 useheader=y id=i';
$gdxin in_i.gdx
I get a lot of errors, but I'll focus on the top-most one (most of the errors are 502 and 510):
*** Error 510 in [my directory name]
Unable to pen gdx file for $GDXIN
I also noticed that if I run the 2 lines in different files, then there are no issues (run line 1 in one "gms" file and then run line 2 in the next "gms" file).
Can anyone help me to understand this issue? I tried inserting a -sleep- command between the 2 lines (thinking that the second line was being run before the first was complete), but that didn't help. Does GAMS not run the scripts from top to bottom?
best,
Brian