Local macro variables are just that. It sounds like you are
defining the macros in your do-file, highlighting them and
doing them/running them then going back and highlighting
where you call them and doing that. If you highlight the
definition of the local macros and the code that uses the
macros all at once and do/run it all at the same time, then
you'll be good.
Highlighting code and running it in your do-file editor is
an instance to Stata. In that instance those local macros
are local to just that instance hence they do not exist
in later instances.
This is why making them global macro variables worked for you.
Dan Blanchette
Applications Analyst Programmer
Carolina Population Center UNC-CH
[email protected]
==========================================================