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 (February 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 26 Feb 2003 13:30:56 -0800
Reply-To:     Patrick.F.O'Neill@KP.ORG
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; RUN;

DATA TWO ; LENGTH KEY $2 ANIMAL $20 ; KEY = '01' ; ANIMAL = 'CAT'; OUTPUT; KEY = '02' ; ANIMAL = 'DOG'; OUTPUT; RUN;

DATA MERGED1 ; MERGE ONE TWO; BY KEY; RUN;

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? Thanks, Pat

Patrick F. O'Neill Kaiser Permanente TPMG HR Systems and Administration 1800 Harrison 7th Floor Oakland, CA 94612


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