GDX2ACCESSExample2.gms : Writing Explanatory Text to Database

Description

This example demonstrates how to write explanatory to an Access database file
using the etFlag option.

This model is referenced in the "Writing Explanatory Text to Database" example
from the GDX2ACCESS Documentation.

Keywords: GDX2ACCESS, data exchange, GAMS language features


Category : GAMS Data Utilities library


Main file : GDX2ACCESSExample2.gms   includes :  GDX2ACCESSExample2.gms

$title Writing Explanatory Text to Database (GDX2ACCESSExample2,SEQ=126)

$onText
This example demonstrates how to write explanatory to an Access database file
using the etFlag option.

This model is referenced in the "Writing Explanatory Text to Database" example
from the GDX2ACCESS Documentation.

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

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

Set
   i       / i1 'one', i2 'two', i3 'three', i4 'four' /
   j       / j1*j4 /
   ij(i,j) / i1.j1 'red', i2.(j2,j3) 'green', i3.(j1,j2) 'blue' /;

$gdxOut example2.gdx
$unLoad i j ij
$gdxOut

* use an INI file here to specify the etFlag option in order to write explanatory text
* to the database file
$onEcho > howToWrite.ini
[settings]
etFlag=1
$offEcho

$call gdx2access example2.gdx @howToWrite.ini > %system.nullfile%
$ifE errorLevel<>0 $abort Error dumping example2.gdx to database!