Argument passing is covered in the manuals at [U] 16.6.1.
You don't say what kind of files have .rtdata
extension. If they were really Stata files
like .dta files, then
------------------------------ rtanalysis.do
args filename
use `filename'.rtdata
...
------------------------------
would be one way to do it. But they don't sound
like .dta files at all. If not, then you
will need to read them in some other way.
Nick
n.j.cox@durham.ac.uk
Morrison Hodges
> This is a beginner's question, I'm sure, but I have not been
> able to do what
> I want to do.
> I have a lot of files generated by a separate custom program,
> all in the
> form of *.rtdata. The * denotes the mnemonic for the
> patient's name. I want
> to do some data studies on each file, and have started a .do
> file to do
> that. The .do file name is rtanalysis, and a sample patient file is
> smith.rtdata. I would like to type:
>
> "do rtanalalysis smith"
>
> and have the do file open the file "smith.rtdata" and do the
> analysis I have
> written.
*
* 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/