SQL2GDX1.gms : Creates a GDX File using SQL2GMS at execution Time and displays it in GDXVIEWER

Description

Store data from Access database (file Transportation.mdb) into a GDX file.
Note that the results are queried using SQL2GMS within the model SQLSr0.
The results are written to include files at first. Afterwards, they are
included to the model and the data is finally stored in Transportation.gdx
using the command-line argument 'gdx='.
The GDX file is displayed using the 'gdxviewer' tool.

This model is referenced in section "Strategies" from the SQL2GMS Documentation.

Keywords: SQL2GMS, data exchange, GAMS language features


Category : GAMS Data Utilities library


Main file : SQL2GDX1.gms   includes :  Transportation.mdb  SQLSr0.gms  SQL2GDX1.gms

$title Creates a GDX File using SQL2GMS at execution Time and displays it in GDXVIEWER (SQL2GDX1,SEQ=055)

$onText
Store data from Access database (file Transportation.mdb) into a GDX file.
Note that the results are queried using SQL2GMS within the model SQLSr0.
The results are written to include files at first. Afterwards, they are
included to the model and the data is finally stored in Transportation.gdx
using the command-line argument 'gdx='.
The GDX file is displayed using the 'gdxviewer' tool.

This model is referenced in section "Strategies" from the SQL2GMS Documentation.

Keywords: SQL2GMS, data exchange, GAMS language features
$offText

$if %system.filesys% == UNIX $abort.noError 'This model cannot run on a non-Windows platform';

execute '=gams.exe SQLSr0 lo=%GAMS.lo% gdx=Transportation.gdx';
abort$errorLevel "step 0 failed";
execute '=gdxviewer.exe Transportation.gdx';