Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Invalid file specification


From   "Hendri Adriaens" <Hendri@uvt.nl>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Invalid file specification
Date   Sat, 7 Jul 2007 11:09:28 +0200

Hello,

I'm trying to do something for several files, using a loop. But somehow, it
doesn't work and the error message "invalid file specification" doesn't
really help.

#delimit;
forvalues x=1/4 {;
  if `x'==1 {local bestand="parsed_cfd.txt"; local zk="cfd";};
  if `x'==2 {local bestand="parsed_qds.txt"; local zk="qds";};
  if `x'==3 {local bestand="parsed_vfd.txt"; local zk="vfd";};
  if `x'==4 {local bestand="parsed_tsa.txt"; local zk="tsa";};

  #delimit;
  clear;
  /* Inlezen */
  insheet a b c d e using "`bestand'", tab;

[some more commands]

};

The complaint comes from insheet (invalid file specification, r(198)), but I
don't see why. I hope someone can help me as r(198) "syntax error" is not
really helpful.

Thanks already, best regards,
-Hendri.

PS: Why can't stata say what code it didn't like and why?

-------------------------------- 
Hendri Adriaens 
Researcher CentERdata 
Tilburg University 
Room K638 
Warandelaan 2, 5037 AB 
PO Box 90153, 5000 LE 
Tilburg, The Netherlands 
Tel.: +31-13-466 3263 / 8325
Fax.: +31-13-466 2764 
E-mail: hendri@uvt.nl
WWW: http://www.centerdata.nl


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index