GAMS command line parameters

Top  Previous  Next

Another of the allowable types of items in a put command is the group of GAMS command line parameters such as input file name and page size.  The attributes are referenced as follows

 

Put "%GAMS.commandparameter%";

 

where we are really addressing the text string in the command line parameter as discussed in the Conditional Compilation chapter.  An example using these items appears in the files putex1.gms.  The component of this file involving command line parameters in put commands is as follows:

 

put "page size         = " "%gams.ps%" /;

put "gams input file   = " "%gams.input%" /;

put "gams restart file = " "%gams.restart%" /;

 

The resultant output is placed on the file myputfile.put and is

 

page size         = 999

gams input file   = C:\GAMS\GAMSPDF\BIGONE\PutEX1.GMS

gams restart file =

 

Note when a parameter is unused it is left blank.  The parameter names are all listed in the GAMS Command Line Parameters chapter.