SQL2GMS.gms : Runs SQL2GMS interactively

Description

This model offers the user first a menu of options using the ASK tool, which
includes to open the SQL2GMS documentation and to run "sql2gms" interactively.

Keywords: SQL2GMS, data exchange, GAMS language features, ASK


Category : GAMS Data Utilities library


Main file : SQL2GMS.gms   includes :  SQL2GMS.gms

$title Runs SQL2GMS interactively (SQL2GMS,SEQ=053)

$onText
This model offers the user first a menu of options using the ASK tool, which
includes to open the SQL2GMS documentation and to run "sql2gms" interactively.

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

$if %system.filesys% == UNIX $abort.noError 'This model cannot run on a non-Windows platform';
$libInclude win32 -c msappavail Access
$if errorlevel 1 $abort.noError 'Microsoft Access is not available!';

Scalar task / 0 /;

$onEcho > ask.opt
T=radiobuttons
M=SQL2GMS SQL database->GAMS import facility
D=Show Documentation (offline)|Run SQL2GMS interactively
E=1|2
R=task = %s;
O=task.inc
$offEcho

$call =ask @ask.opt
$ifE errorLevel<>0 $abort Error running ASK!
$include task.inc

if(task=1,
$  libInclude win32 -e shellexecute "%gams.sysdir%\docs\T_SQL2GMS.html"
elseIf task=2,
   execute 'sql2gms';
);