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 (April 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 6 Apr 2010 08:22:38 -0500
Reply-To:   Craig Johnson <cjohns38@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Craig Johnson <cjohns38@GMAIL.COM>
Subject:   Re: Inserting Character and Numeric Values into a Single Character Column
Comments:   cc: jim.1stat@yahoo.com, msz03@albany.edu
In-Reply-To:   <201004060930.o366HpMc021479@malibu.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

Jim -

That's a new on on me for preferring non-numerical values for IDs. I was always told it was better to use numeric keys. Then again most of the stuff I have worked with is database driven and uses the primary key (autonumber, no dups) as the ID or had employee ID's. I'll have to do some more looking and reading about this idea. Any references you can pass along to this concept?

Mike -

PERFECT! I ran the following sample code and things worked out exactly as I was hoping for. I figured there had to be a way to do it I just didn't know where to look. I'll have to add this to my very short list of tricks. Now all I need to do is adjust the actual macro and that section will be complete. Thanks!

/*Generate Blank Set*/ data Errors; set _Null_; attrib Name length=$80; attrib Value length=$80; run;

/*Brute force example of putting numeric/char into same char variable*/ proc sql; insert into errors (Name, Value) select Name, CATT(height) as value length=80 from sashelp.class where height > 50;

insert into errors (Name, Value) select name, CATT(sex) as value length=80 from sashelp.class where sex="F"; quit;


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