I want to combine a number of datasets and each dataset contains a variable with the name of that dataset for every observations (no missing values). No matter what I do the variable gets truncated in the combined dataset. I have tried increasing the length to 100 in each dataset before joining them. I have tried setting length again before the set statement in a data step. I have tried joining the tables using outer union corr in proc sql. Can anyone help me work out why this variable still gets truncated? Example code: data want; length str $100.; set a b c; run; proc sql ; create table want as select * from a outer union corr select * from b outer union corr select * from c outer union corr ;quit;
... View more