System attributes that can be included

Top  Previous  Next

System attributes may be used in conditional compilation.  The characteristics of the various attributes are most comprehensively discussed in the Output via Put Commands chapter.  The ones that can be used and a brief description follows

 

.DATEIdentifies date on which model was run
.ELAPSEDIdentifies time used
.ERRORLEVELIdentifies error level
.FEIdentifies file extension of input file
.FNIdentifies file name stem of input file
.FPIdentifies file path of input file
.FILESYSIdentifies name of the operating system being used in
.GAMSRELEASEIdentifies GAMS release number
.GAMSVERSIONIdentifies GAMS version number
.GSTRINGIdentifies exact GAMS version being used in
.IFILEIdentifies main input file
.INCPARENTIdentifies parent file that includes this one
.INCNAMEIdentifies name of file being included
.INCLINE.Identifies line number of include file being executed
.LICE1Identifies first license file line
.LICE2Identifies second license file line
.LINEIdentifies line number of overall file being executed
.LISTLINEIdentifies listing file line number
.LICENSESTATUS Identifies if a license error has arisen (returns a nonzero in such a case)
.LICENSESTATUSTEXTGives text sting that describes a license error )if one arose)
.LP,NLP,...For all model types identifies solver
.MEMORYIdentifies memory used
.OFILEIdentifies LST file
.OPAGEIdentifies page number in output
.PAGEIdentifies output page
.PFILEIdentifies current put file
.PLATFORMIdentifies computer type
.PRLINEIdentifies line in output file
.PRPAGEIdentifies page in output file
.RDATEIdentifies run date
.REDIRLOGIdentifies log file name
.RFILEIdentifies restart file
.RTIMEIdentifies restart file creation time
.SFILEIdentifies save file
.SSTRINGIdentifies last solver used
.TCLOSEIdentifies time job ended
.TCOMPIdentifies compile time
.TEXECIdentifies execution time
.TIMEIdentifies time of run
.TITLEIdentifies Job title
.TSTARTIdentifies time job started
.VERSIONIdentifies GAMS version number
.VERIDIdentifies GAMS version

 

These attributes may be included in the command soon using the syntax %system.attribute % or "%system.attribute%" where the quoted form is preferable if there are spaces in the line.

Examples:

(syschar.gms)

$set systemDATE      "%system.DATE%"

$set systemTIME      "%system.TIME%"

$set systemINCPARENT "%system.INCPARENT%"

$set systemINCNAME   "%system.INCNAME%"

$set systemINCLINE   "%system.INCLINE%"

$set systemLINE      "%system.LINE%"

$set systemVERSION   "%system.VERSION%"

$set systemGSTRING   "%system.GSTRING%"

$set systemFILESYS   "%system.FILESYS%"

$set systemPRLINE    "%system.PRLINE%"

$set systemPRPAGE    "%system.PRPAGE%"

$show

display "system.DATE"      ,"%system.DATE%"      ;

display "system.TIME"      ,"%system.TIME%"      ;

display "system.INCPARENT" ,"%system.INCPARENT%"     ;

display "system.INCNAME"   ,"%system.INCNAME%"      ;

display "system.INCLINE"   ,"%system.INCLINE%"      ;

display "system.LINE"      ,"%system.LINE%"      ;

display "system.VERSION"   ,"%system.VERSION%"      ;

display "system.GSTRING"   ,"%system.GSTRING%"      ;

display "system.FILESYS"   ,"%system.FILESYS%"      ;

display "system.PRLINE"    ,"%system.PRLINE%"      ;

display "system.PRPAGE"    ,"%system.PRPAGE%"      ;