Greetings!
I think I have a problem with quoting at the command line vs a do file?
My do file contains:
local lname _summary.csv
local lid PF006
import delimited "`lid'`lname’”, clear
<lots of code>
gen subject_id = “”
replace subject_id =`"`lid'"'
<more code>
Unfortunately, the do file always returns a blank for subject_id
In troubleshooting, I stop the do file after the ‘ gen subject_id =“” ‘ line.
Then, when I issue the very same replace command from the command line, PF006 is correctly returned.
I’ve tried all permutations of quoting to no avail. I’ve tried to concatenate quotes and use char(34) without luck. Can you help?
Regards,
-bill
William Paredes
Clinical Research Coordinator
Dept of Medicine; Div of Nephrology
Albert Einstein College of Medicine
1300 Morris Park Avenue
Block Bldg, Rm 612
Bronx NY 10461
[718] 430-3088 (office)
[718] 430-2044 (fax)
I think I have a problem with quoting at the command line vs a do file?
My do file contains:
local lname _summary.csv
local lid PF006
import delimited "`lid'`lname’”, clear
<lots of code>
gen subject_id = “”
replace subject_id =`"`lid'"'
<more code>
Unfortunately, the do file always returns a blank for subject_id
In troubleshooting, I stop the do file after the ‘ gen subject_id =“” ‘ line.
Then, when I issue the very same replace command from the command line, PF006 is correctly returned.
I’ve tried all permutations of quoting to no avail. I’ve tried to concatenate quotes and use char(34) without luck. Can you help?
Regards,
-bill
William Paredes
Clinical Research Coordinator
Dept of Medicine; Div of Nephrology
Albert Einstein College of Medicine
1300 Morris Park Avenue
Block Bldg, Rm 612
Bronx NY 10461
[718] 430-3088 (office)
[718] 430-2044 (fax)
Comment