Date: Thu, 30 Sep 2004 11:53:03 +0200
Reply-To: Robert Bardos <bardos2@ANSYS.CH>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robert Bardos <bardos2@ANSYS.CH>
Subject: Re: Combining data with different length of fields
Content-Type: text/plain; charset="iso-8859-1"
as given I could not reproduce your problem, ie. using the length statement
ahead of set should do. As soon as I inserted a "format plan $6. mbrid $5."
statement in the step creating data1 the problem was there. So it is a
display/format problem rather than a length problem that you have to solve.
Hope this helps
Ansys AG, Switzerland
Von: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]Im Auftrag von
Gesendet: Donnerstag, 30. September 2004 00:37
Betreff: Combining data with different length of fields
I have several datasets with variables like "plan","mbrid" etc. They
have different length ($6-$25).
data1 'bcbswa' 'xxxxx'
data2 'wellpoint' 'xxxxxxxxxx'
When I combine them like this:
length plan $ 50 mbrid $50;
set data1 data2;
It cut off something in the 2nd dataset. I tried to define the length
and data2 seperately but it didn't work either. At last I changed the
sequence of data sets like "set data2 data1;" It worked.
Is there an alternative way to avoid losing information when combining
I have tens of datasets and hundreds of fields. I am not supposed to
count the maximum length of each field.
Thanks for your help,