Description
Store data from Access database (file Transportation.mdb) into a GDX file. 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 : MDB2GDX2.gms includes : Transportation.mdb MDB2GDX2.gms
$title Creates a GDX File using MDB2GMS at compile Time (MDB2GDX2,SEQ=043)
$onText
Store data from Access database (file Transportation.mdb) into a GDX file.
This model is referenced in section "Strategies" from the MDB2GMS Documentation.
Keywords: MDB2GMS, data exchange, GAMS language features
$offText
$if %system.filesys% == UNIX $abort.noError 'This model cannot run on a non-Windows platform';
$call msappavail -Access
$ifE errorlevel<>0 $abort.noError 'Microsoft Access is not available!';
$onEcho > howToRead.txt
I=Transportation.mdb
X=Transportation.gdx
Q1=SELECT name FROM suppliers
S1=i
Q2=SELECT name FROM demandcenters
S2=j
Q3=SELECT name, demand FROM demandcenters
P3=demand
Q4=SELECT name, supply FROM suppliers
P4=supply
Q5=SELECT supplier, demandcenter, distance FROM distances
P5=dist
$offEcho
$call mdb2gms.exe @howToRead.txt > %system.nullfile%
$ifE errorLevel<>0 $abort Error using MDB2GMS!