Hello Statalist,

I am writing a long .do file that uses the same command at many different points:

keep if geo_id == "1600000US0606028" | geo_id == "1600000US0612048" | geo_id == "1600000US0614260" | geo_id == "1600000US0618986" | geo_id == "1600000US0618996" | geo_id == "1600000US0619022" | geo_id == "1600000US0636434" | geo_id == "1600000US0636448" | geo_id == "1600000US0636452" | geo_id == "1600000US0640354" | geo_id == "1600000US0629112" | geo_id == "1600000US0646660" | geo_id == "1600000US0652302" | geo_id == "1600000US0653224" | geo_id == "1600000US0655184" | geo_id == "1600000US0655254" | geo_id == "1600000US0659500" | geo_id == "1600000US0672156" | geo_id == "1600000US0678456" | geo_id == "1600000US0678596" | geo_id == "1600000US0683085" | geo_id == "1600000US0685208"

It takes up a lot of space and looks messy, so I'd like to be able to use a macro (or some other method) to store this exact line of command so that I can reference it in the .do file without having to copy and paste the long command line.

Is this possible?

Thanks,
Ian