Description
This program calls a number of GAMS programs. Each program performs one task in the given sequence: Data extraction --> Data manipulation --> Model definition --> Model solution --> Report writing This model is referenced in section "Strategies" from the SQL2GMS Documentation. Keywords: SQL2GMS, data exchange, GAMS language features
Category : GAMS Data Utilities library
Main file : SQLSr5.gms includes : Transportation.accdb SQLSr0.gms Sr1.gms Sr2.gms Sr3.gms Sr4.gms SQLSr5.gms
$title Sequence of GAMS Models using the save/restart Facility (SQLSr5,SEQ=054)
$onText
This program calls a number of GAMS programs. Each program performs one task in the given sequence:
Data extraction --> Data manipulation --> Model definition --> Model solution --> Report writing
This model is referenced in section "Strategies" from the SQL2GMS Documentation.
Keywords: SQL2GMS, data exchange, GAMS language features
$offText
$callTool win32.msappavail Access
$if errorlevel 1 $abort.noError "No Access available"
*Data extraction
execute '=gams.exe SQLSr0 lo=%GAMS.lo% save=s0';
abort$errorLevel "step 0 failed";
*Data manipulation
execute '=gams.exe Sr1 lo=%GAMS.lo% restart=s0 save=s1';
abort$errorLevel "step 1 failed";
*Model definition
execute '=gams.exe Sr2 lo=%GAMS.lo% restart=s1 save=s2';
abort$errorLevel "step 2 failed";
*Model solution
execute '=gams.exe Sr3 lo=%GAMS.lo% restart=s2 save=s3';
abort$errorLevel "step 3 failed";
*Report writing
execute '=gams.exe Sr4 lo=%GAMS.lo% restart=s3';
abort$errorLevel "step 4 failed";