The reason you are getting a variable with the length of one is more
than likely the fact that the first data set you bring in the data step
has a missing value for that variable (the first data set is setting the
length of your variables for all the datasets you are brining in.). The
easiest way to solve the problem is to use a length statement and set
the variable(s) to the length you desire.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Thursday, September 16, 2004 2:19 PM
Subject: SAS concatenation problem
I have a SAS data step that concatenates several files into one. The
looks like this:
data all1; set baseball1 mbasketball1 wbasketball1 mxcntry1 wxcntry1
mgolf1 wgolf1 menlax1 wmnlax1 msoccer1 wsoccer1 softball1 mswim1
wtennis1 mtrack1 wtrack1 volleyball1 wrowing1 wrestling1 others1;
All of the files have the exact same layout, but one of the text fields
null/empty in most of the files. I notice that the data set that is
created (all1) is exactly the way I expect it to be except for that one
field. That field has been truncated to 1 character. Does anyone know
this is and what I can do to correct this?
Please reply to my email address.