Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: using a string variable with use and save command


From   Kushan Thakkar <[email protected]>
To   [email protected]
Subject   st: using a string variable with use and save command
Date   Mon, 12 Oct 2009 22:23:49 -0400

I want to write a program that reads a list of files one by one
(through a for loop) while making changes. In order to do so, i will
need to supply a the file name as a variable with the use command.

For example:

gen filestr = "file name here"
gen fileno = 1
gen infile = filestr + fileno
use infile, clear

Could somebody please help me with the correct syntax for doing this?

Thanks.
Kushan
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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