|
The file specification must always appear before any put commands and in general is formatted as follows
File localfileidentifier optional explanatory text / externalfilelocation/;
or
Files localfileidentifier optional explanatory text / externalfilelocation/;
Notes:
| • | The externalfilelocation entry can be any valid filename and file location on the computer system including a full path specification. It is limited to 255 characters. |
| • | When the externalfilelocation is left off the external name will be localfileidentifier.put ie the localfileidentifier plus the extension put. |
| • | If the externalfilelocation does not contain a path specification within then by default the file is placed in the directory where one is working. |
| • | The default directory where put files are kept may be altered with the Putdir command line parameter. |
| • | The localfileidentifier and optional explanatory text must obey the GAMS item naming rules as specified in the Name Rules chapter. |
| • | A file statement can contain more than one localfileidentifier and associated location. |
File name1/"c:\file1.out"/,file2 /"d:\out\myreport.txt"/;
| • | There can be more than one file statement in a program. |
| • | The name of the active put file can be changed using Put_utility |
|