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

st: Invalid file specification

From   "Hendri Adriaens" <>
To   <>
Subject   st: Invalid file specification
Date   Sat, 7 Jul 2007 11:09:28 +0200


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.

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";};

  /* 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,

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 

*   For searches and help try:

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