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

Description

Store data from Access database (file Transportation.accdb) into a GDX file.
Note that the results are queried using MDB2GMS within the model MDBsr0.
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 MDB2GMS Documentation.

Keywords: MDB2GMS, data exchange, GAMS language features


Category : GAMS Data Utilities library


Main file : MDB2GDX1.gms   includes :  MDBSr0.gms  Transportation.accdb  MDB2GDX1.gms

$title Creates a GDX File using MDB2GMS at execution Time and displays it in GDXVIEWER (MDB2GDX1,SEQ=042)

$onText
Store data from Access database (file Transportation.accdb) into a GDX file.
Note that the results are queried using MDB2GMS within the model MDBsr0.
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 MDB2GMS Documentation.

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

$callTool win32.msappavail Access
$if errorlevel 1 $abort.noError "No Access available"

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