issues with gams commands

Hi all,

i am facing an unexpected behaviour regarding $call and $csv2gams commands which I am not able to resolve. Execution of statements like

$call  rmdir /S /Q 20200821_PC

results in a errorstate (1, “System cannot find path”).

Nevertheless, the command is executed properly (and doing the expected operation). As I have integrated checks for further processing the errorstate caused by the statement is ending the program execution. I have created two simple examples to reproduce the unexpected behaviour.

Issue 1:

  • drop folder and files
  • create new folders

Issue 1.zip (460 Bytes)
Issue 2:

  • transform .csv into gdx file

Issue 2.zip (2.97 KB)
Log (german) for issue 1 program is as follows:

— Issue1.gms(3) 2 Mb
— call rmdir /S /Q 20200821_PC
Das System kann den angegebenen Pfad nicht finden.
1
— Issue1.gms(6) 2 Mb
— call mkdir 20200821_PC
Das System kann den angegebenen Pfad nicht finden.
1
— Issue1.gms(9) 2 Mb
— call mkdir 20200821_PC\a2-16
Das System kann den angegebenen Pfad nicht finden.
1
— Issue1.gms(12) 2 Mb
*** Status: Normal completion[LST:33]
— Job Issue1.gms Stop 08/26/20 16:00:26 elapsed 0:00:00.163

In both programs I am receiving the same issue resulting in an errorstate “1” which stops further processing. I have read the section in the documentation, especially the hints for OS windows. Unfortunately, I am not able to resolve the issue on my own. I have tried several versions (different quoting (using “”, ‘’, ‘“”’,…), complete paths, …). Every try resulted in the same errorstate. Despite this, commands from command line seem to work fine without any issues.

I would appreciate any advice/hint to resolve this issue.

Thank you,
Regards
Issue 1.zip (460 Bytes)

Hi,

Both examples work fine for me:

-- Starting compilation
--- Issue1.gms(3) 2 Mb
--- call rmdir /S /Q 20200821_PC
0
--- Issue1.gms(6) 2 Mb
--- call mkdir 20200821_PC
0
--- Issue1.gms(9) 2 Mb
--- call mkdir 20200821_PC\a2-16
0
--- Issue1.gms(12) 2 Mb
--- Starting execution - empty program
*** Status: Normal completion[LST:35]
--- Job Issue1.gms Stop 08/26/20 16:25:06 elapsed 0:00:00.040



--- Starting compilation
Scoped compile-time variable SCENARIO is set to "20200821_PC"
Scoped compile-time variable INSTANCE is set to "B4-48"
Scoped compile-time variable TEST_SET is set to "SP_CORDEAU"
Scoped compile-time variable FILENAME is set to "Source\B4-48\B4-48.csv"
0
--- prepare_data.gms(52) 2 Mb
--- call csv2gdx "Source\B4-48\B4-48.csv" Output="20200821_PC\B4-48\prep.gdx" @Dateneingabe_csv.txt
No errors, CSV2GDX time = 15ms
0
--- prepare_data.gms(55) 2 Mb
--- GDXin=C:\Users\user\Documents\support\Issue 2\20200821_PC\B4-48\prep.gdx
0
--- prepare_data.gms(60) 3 Mb
--- Starting execution - empty program
*** Status: Normal completion[LST:61]
--- Job prepare_data.gms Stop 08/26/20 16:26:07 elapsed 0:00:00.095

Could you share the full logs?

Fred

Hi Fred,

thanks for your quick reply. Please find the log file attached. Or do you need something different / more?

Kind regards,
Issue1.log (952 Bytes)

What happens if you run rmdir or mkdir from the command line? Do you get the same message

Das System kann den angegebenen Pfad nicht finden.

and if so, are you sure that the task (creating/removing) directory is carried out anyway. This sounds strange.

The log of issue 2 where you call csv2gdx would also be of interest.

Fred