I wanted to create a global called countrycode which should have the country code of a country (of course) and then use that global for conditional statements.
Take the following example, this is the code I'm running (I want to keep those observations where the variable countrycode is equal to the local ccode, which in this case is RWA):
Code:
global ccode "RWA" list if countrycode==`ccode'
. do "/var/folders/x9/1zrmd2qj5qj6dmw592sbwxq40000gn/T//SD51173.000000"
. global ccode "RWA"
. list if countrycode==`ccode'
invalid syntax
r(198);
end of do-file
r(198);
. global ccode "RWA"
. list if countrycode==`ccode'
invalid syntax
r(198);
end of do-file
r(198);
Array
Thank you for your help!
Guido
0 Response to How to use global macros inside conditional statements
Post a Comment