Statalist


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

st: Re: help with inputst


From   Ricardo Ovaldia <ovaldia@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: help with inputst
Date   Thu, 20 Dec 2007 09:50:56 -0800 (PST)

Dear all,

I have several data files in text format that I want
to convert into Stata datasets using stat/transfer.

I created a macro containing the text data file names
and try to use -foreach- and -inputst- to read the
data but it keeps giving me errors. It appears that
stat/transfer can not understand the local macro.

Here is my code:

clear
local files MRecord-I-080907 MRecord-I-013107
MRecord-I-020807 MRecord-I-021507 MRecord-I-030807
MRecord-I-031507 

foreach fname in `files' {
        inputst "C:\statawrk\MAPMISS\`fname'.txt"
	save `fname'.dta, replace
}

. qui {
Stat/Transfer did not run successfully
file not found
r(601);

end of do-file

Thank you,
Ricardo

Ricardo Ovaldia, MS
Statistician 
Oklahoma City, OK



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index