Date: Wed, 26 Feb 2003 13:30:56 -0800
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Patrick F. O'Neill" <Patrick.F.O'Neill@KP.ORG>
Subject: Multiple lengths warning
Content-Type: text/plain; charset="us-ascii"
Dear SAS-L._all_ ,
I'm trying to understand this warning (after a merge):
WARNING: Multiple lengths were specified for the BY variable FRM_DEPT by
input data sets. This may
cause unexpected results.
When I try and produce such a warning with the following code, I don't get
one (but the lengths on the two data sets are different).
DATA ONE ;
LENGTH KEY $3
COLOR $20 ;
KEY = '01 ' ; COLOR = 'RED'; OUTPUT;
KEY = '02 ' ; COLOR = 'BLUE'; OUTPUT;
DATA TWO ;
LENGTH KEY $2
ANIMAL $20 ;
KEY = '01' ; ANIMAL = 'CAT'; OUTPUT;
KEY = '02' ; ANIMAL = 'DOG'; OUTPUT;
DATA MERGED1 ;
But when I change dataset TWO to have LENGTH KEY $20
then the warning is printed in the log. Are lengths $3 and $2 close
enough for SAS not to warn me?
What am I missing?
Patrick F. O'Neill
TPMG HR Systems and Administration
1800 Harrison 7th Floor
Oakland, CA 94612