Running GAMS from the command line

Top  Previous  Next

The basic procedure involved for running command line GAMS is to create a file (nominally with the extension gms nominally myfilename.gms where myfilename is whatever is a legal name on the operating system being used) with a text editor and when done run it with a DOS or UNIX or other operating system command line instruction like

 

GAMS tranport

 

where tranport.gms is the file to be run.  Note the gms extension may be omitted and GAMS will still find the file.

GAMS would then run the job and in turn create a LST file (tranport.LST in this case) of problem results.  One would then edit the LST file to find any error messages, solution output, report writing displays etc and reedit the gms file if there were need to fix anything or alter the model contents.

The basic command line GAMS call also allows a number of arguments as illustrated below

 

GAMS TRNSPORT pw=80 ps=9999 s=mysave

 

which sets the page width to 80, the page length to 9999 and saves work files.  The full array of possible command line arguments is discussed in the GAMS Command Line Parameters chapter.