IndexMapping2.gms : MDB2GMS Example 6 - Index mapping done in Database

Description

This example shows how to map index names if the names in the
database are different from the ones in the GAMS model.
In this case all mapping is handled inside the database.

This model is referenced in "Example 6 - Index Mapping" section "Index mapping
done in Database" from the MDB2GMS Documentation.

Keywords: MDB2GMS, data exchange, GAMS language features


Category : GAMS Data Utilities library


Main file : IndexMapping2.gms   includes :  Sample.accdb  IndexMapping2.gms

$title MDB2GMS Example 6 - Index mapping done in Database (IndexMapping2,SEQ=039)

$onText
This example shows how to map index names if the names in the
database are different from the ones in the GAMS model.
In this case all mapping is handled inside the database.

This model is referenced in "Example 6 - Index Mapping" section "Index mapping
done in Database" from the MDB2GMS Documentation.

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

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

Set i / NY, DC, LA, SF /;

$onEcho > howToRead.txt
I=Sample.accdb
Q=SELECT [GAMS City], [value] FROM [example table], CityMapper WHERE CityMapper.[Access City]=[example table].city
O=city2.inc
$offEcho

$call mdb2gms @howToRead.txt > %system.nullfile%
$ifE errorLevel<>0 $abort Error using MDB2GMS!

Parameter data(i)/
$include city2.inc
/;
display data;