Expand: Ef

Top  Previous  Next

The expand parameter generates a file that contains information about all the input files processed during a particular compilation. By default names are composed by completing the name with the working directory. String input is expected.

The command is implemented with the syntax

 

Expand=filename

or

Ef=filename

 

Example:

 

parameter a ; a = 0 ;

$include file2.inc

$include file2.inc

 

where file2.inc contains

 

a = a+1;

display a;

 

Running the model with the command line flag expand myfile.fil results in the creation of the myfile.fil with the following content

 

1 INPUT   0 0 0 1 7 E:\TEMP\FILE1.GMS

2 INCLUDE 1 1 2 2 4 E:\TEMP\FILE2.INC

3 INCLUDE 1 1 3 5 7 E:\TEMP\FILE2.INC

 

The first row always refers the parent file called by the GAMS call.
The first column gives the sequence number of the input files encountered.
The second column refers to the type of file being referenced. The various types are

0 INPUT                 

1 INCLUDE

2 BATINCLUDE         

3 LIBINCLUDE

4 SYSINCLUDE

The third column provides the sequence number of the parent file for the file being referenced.
The fifth column gives the local line number in the parent file where the $include appeared.
The sixth column gives the global (expanded) line number which contained the $include statement.
The seventh column provides the total number of lines in the file after it is processed.
The eighth and last column provides the name of the file.