LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 19 Nov 2004 11:34:49 -0700
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: Use of Variable With 21 Characters
Comments: To: Michael.F.Murphy@KP.ORG
Content-Type: text/plain; charset=us-ascii

One reason to keep the current scheme is that you can code

proc sql; select * from mydata.stuff where membship in (select membship from mydata.otherstuff); quit;

but SAS, unlike some data base systems, does not support the very useful

proc sql; select * from mydata.stuff where (group, subgroup, acct, eff_da) in (select group, subgroup, acct, eff_da from mydata.otherstuff); quit;

That's a somewhat trivial example, since it's easy in this case to just code a join, but in some other circumstances that's not possible.

Another reason to keep the current scheme is that it's easy to use a single value for format-based lookups, but more difficult for multiple values.

Esthetically, though (and I think that esthetics are very important in programming), it's much better to keep four values in four variables.

-- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Department, First Health West Sacramento, California USA

>>> "Michael F. Murphy" <Michael.F.Murphy@KP.ORG> 11/19/2004 10:15 AM >>> Dear SAS-L'ers

I'm reviewing a membership system that includes a variable called "Membship", created in the days when variable names could not be more than 8 characters long.

Membship is a concatination of four variables: Group number converted to a 5-character string Subgroup number converted to a 3-character string Family Account number converted to an 8-character string Effective date of health care coverage converted to a 5-character string.

Hence Membship is a 21 character string.

We are trying to decide whether to keep this variable or replace it with the following four numeric variables: Group, Subgroup, Family_Acct, and Eff_Date. I am having trouble coming up with reasons for keeping Membship, but there may be reasons for keeping it. Can anyone think of reasons for keeping this 21-character variable instead of the four numeric variables?

Thanks.

"MMS <firsthealth.com>" made the following annotations. ------------------------------------------------------------------------------ This message, including any attachments, is intended solely for the use of the named recipient(s) and may contain confidential and/or privileged information. Any unauthorized review, use, disclosure or distribution of this communication(s) is expressly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy any and all copies of the original message. Thank you. =============================================================================


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