Error 282 - Unable to open include file

I am having a problem in oppening an include file, I’ve tried with other .inc file and it haven’t worked as well.
In other part of the program I call another .in file, but it opens properly. so i don’t know why it is happening once that both files are in the same directory.

My problem is in this part of the program

Table d(i,j) distance in thousands of miles
$include set2.inc ;

What could be the reasons for it malfunction? is there any sintax error here?


The versiom that i’m using is the following:

GAMSIDE build 42728 / 43572
GAMS Release 24.2.1 r43572 WEX-VS8 x86/MS Windows
Release Date Released Dec 9, 2013
License Date Dec 9, 2013

No License file found

All files needed to test this program are here

Thank you.



\

basico.gms (2.07 KB)
set1.inc (546 Bytes)
results.xls (25.5 KB)
set2.inc (629 Bytes)

Andre,

Look at the two include statements:

  • works:
    $include set1.inc
  • does not work
    $include set2.inc ;

what’s the difference (besides the 1 and 2)? It’s the semicolon at the end of the line. $include is a compile time directive, and these will interpret the ‘;’ as part of the directive (here as part of the filename). Hence, if you take the ‘;’ away, the model runs as expected.

Michael


On Fri, Feb 21, 2014 at 2:11 PM, Andre Costa wrote:

I am having a problem in oppening an include file, I’ve tried with other .inc file and it haven’t worked as well.
In other part of the program I call another .in file, but it opens properly. so i don’t know why it is happening once that both files are in the same directory.

My problem is in this part of the program

Table d(i,j) distance in thousands of miles
$include set2.inc ;

What could be the reasons for it malfunction? is there any sintax error here?


The versiom that i’m using is the following:

GAMSIDE build 42728 / 43572
GAMS Release 24.2.1 r43572 WEX-VS8 x86/MS Windows
Release Date Released Dec 9, 2013
License Date Dec 9, 2013

No License file found

All files needed to test this program are here

Thank you.



\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.



\

Michael R. Bussieck, Ph.D.
Fon/Fax: +1 202 342-0180/1 (USA) +49 221 949-9170/1 (Germany)
www.gams.com


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.