Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: macro - expansion problem

From   Fred Wolfe <>
Subject   st: macro - expansion problem
Date   Sat, 12 Feb 2005 10:22:28 -0600

I wonder if any Statalister might help me with this problem: using windows xp, stata 8.2SE - up to date.

I am passing a series of file descriptions to the -file- program in the macro -fname-.

They look like:


file open `wfile' using c:/ado/personal/projects.hlp, write replace
file write `wfile' "{smcl}" _n
foreach fname of local dirs {
file write `wfile' "View {view `fname'}" _n

After the program runs, I look in the created help file and see this:

View \statdata\ADR\adr.hlp
View \statdata\adrepi\adrepi.hlp
View \statdata\back\backpain.hlp
View \statdata\back\fibro.hlp
View \statdata\back\utility.hlp
View \statdata\cancerfu\breastcancer.hlp
View \statdata\cancerfu\cancerfu.hlp
View \statdata\cancerfu\lungcancer.hlp

When I click on one of these, I get the following:

file c not found
request was:

view c

The ":" is being dropped and the path/file split apart.

I would like to see:

View c:\statdata\ADR\adr.hlp

I have not been able to solve this problem with escape characters "\" or macval() or any other text I could think of.

Does anyone have any suggestions?


Fred Wolfe

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125 Fax (316) 263-0761

* For searches and help try:

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