-import delimited- and -insheet- create variable names with a tilde when the name in the first line of the data file too long. But I find that the -generate- command won't allow such names on the right-hand side. I can -rename-, but I would prefer to avoid the extra work. For example here I can -describe- or -rename- a variable, but -generate- thinks it has an "invalid name".:

Code:
import delimited using /tmp/Links_2007.txt
(18 vars, 99,999 obs)

. des shareholderbv~d

              storage   display    value
variable name   type    format     label      variable label
-------------------------------------------------------------------------------
shareholderbv~d str19   %19s                  Shareholder BvD ID

. gen x=shareholderbv~d
shareholderbv~d invalid name
r(198);

. rename shareholderbv~d x0

. des x
              storage   display    value
variable name   type    format     label      variable label
-------------------------------------------------------------------------------
x               str19   %19s                  Shareholder BvD ID
Am I overlooking something very simple? Any suggestions?

Daniel Feenberg
NBER