LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 13 Jan 2004 15:34:30 -0500
Reply-To:   Don Stanley <don_stanley@PARADISE.NET.NZ>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Don Stanley <don_stanley@PARADISE.NET.NZ>
Subject:   Re: Select distinct / variable length bug? (proc sql)
Comments:   To: ben.powell@CLA.CO.UK

I assume that the first dataset in the SET statement was the one with the glitch in the length? If so, this is no bug, SAS is behaving as expected. On the SET, it will determine the length of variables from the length in the first dataset. Then, each of the other datasets will see the variable truncated to the length in the first (when the lengths differ).

The easiest fix is to ensure correctness of the dataset structure, alternatively, to ensure that these read correctly if for some reason you have to have different lengths in the input datasets, just put

length <variablename> $ 10 ;

before the SET statement.

On the other hand, if the first dataset in the SET is not the one with the incorrect length ....

Don


Back to: Top of message | Previous page | Main SAS-L page