f



Re: SAS concatenation problem #2

Llyod,

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.

HTH
Toby Dunn
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Lloyd Dollins
Sent: Thursday, September 16, 2004 2:19 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: SAS concatenation problem

I have a SAS data step that concatenates several files into one.  The
code
looks like this:

data all1; set baseball1 mbasketball1 wbasketball1 mxcntry1 wxcntry1
football1 fhockey1
      mgolf1 wgolf1 menlax1 wmnlax1 msoccer1 wsoccer1 softball1 mswim1
wswim1 mtennis1
      wtennis1 mtrack1 wtrack1 volleyball1 wrowing1 wrestling1 others1;

All of the files have the exact same layout, but one of the text fields
is
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
why
this is and what I can do to correct this?

Please reply to my email address.

Thank you,
Lloyd Dollins
dollins@virginia.edu
0
Toby.Dunn (894)
9/16/2004 7:49:59 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
678 Views

Similar Articles

[PageSpeed] 4

Reply: