Hi guys, I'm encountered a syntax problem that should be easy to solve but I still can't nail how to write.
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):
This is what the console prints:
The capture of the database is below (keep only Rwanda):

Thank you for your help!
Guido
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);
Thank you for your help!
Guido
Comment