Hi all,
I need a bit of help getting SAS to accept dynamically generated data in an input statement. Consider this data step (fictionary data):
data DEAdata;
format firms $12.;
input firms $ object con1-con9;
datalines;
beta 1 2 &x 0 4 1 2 2 1 2
La0 1 2 3 0 4 1 2 2 1 2
Lb 1 2 3 0 4 1 2 2 1 2
Lc 1 2 3 0 4 1 2 2 1 2
Ld 1 2 3 0 4 1 2 2 1 2
Le 1 2 3 0 4 1 2 2 1 2
Lf 1 2 3 0 4 1 2 2 1 2
_RHS_ 1 2 3 0 4 1 2 2 1 2
;
My problem is the "x" variable in the first row which is a global variable(hence the &) that is assigned a value dynamically prior to this data step when the script is run. But SAS does not accept that I place the variable directly in the datalines as above. It is deemed invalid data in the log. Can anyone help me on this one? I can only come up with one possible explanation. Earlier in the script I use the "call symput" routine in order to make "x" a global variable. As far as I can tell this routine converts any numeric data into character data meaning that I am trying to input character data datastep written above?
Hope someone can help me. Thanks.
Kim
... View more