Is there any way to get the shortname of a variable into a macro, given the longname? Something similar to the macro extended function "variable label", but that returns the shortname. I have a -foreach- loop:
but I would liike to add the shortnames to each line of output.
Code:
foreach name of local varlist {
file write varfile "`name'" _n
}

Comment