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 (October 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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???
Comments: To: Jeff Morison <jmt_mtf@YAHOO.COM>
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>


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