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?