Date: Fri, 4 Oct 2002 17:56:43 -0400
Reply-To: Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject: Re: Better way to code this???
Content-Type: text/plain; charset="iso-8859-1"
Jeff,
Turn the code into a format. I would use an editor to delete "if", replace
"then" with semi-colon, and replace original semi-colons with "; output ;".
Now use these statements to build a SAS data set and modify it to a CNTLIN
dataset for PROC FORMAT. Rename current_first_name to start, stdfname to
label and retain FMTNAME "$stdnam".
IanWhitlock@westat.com
-----Original Message-----
From: Jeff Morison [mailto:jmt_mtf@YAHOO.COM]
Sent: Tuesday, October 01, 2002 6:20 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Better way to code this???
Hi Folks:
Is there any better way to code this?.
I am inheriting this code from other programmer, just
want to improve it.
TIA,
Jeff
if current_first_name = 'ABBE' then stdfname='AB';
if current_first_name = 'ABI' then stdfname='AB';
if current_first_name = 'ABDU' then stdfname='ABD';
if current_first_name = 'ABDOOL' then stdfname='ABDL';
if current_first_name = 'ABDUL' then stdfname='ABDL';
if current_first_name = 'ABDIEL' then stdfname='ABDL';
if current_first_name = 'ABDULLAH' then
stdfname='ABDLH';
<SNIP>
|