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 (January 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 8 Jan 2008 14:05:40 -0600
Reply-To:     bruce johnson <chimanbj@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         bruce johnson <chimanbj@GMAIL.COM>
Subject:      Re: inserting (not replacing!) characters into strings
Comments: To: wcw2 <wcw2@cdc.gov>
In-Reply-To:  <200801082002.m08BkNFb009285@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

It may not be the most elegant, but it works...

data temp; patientid="28300102"; patid=substr(patientid,1,2)||"-"||substr(patientid,3,2)||"-"||substr(patientid,5); put _all_; run;

PATIENTID=28300102 PATID=28-30-0102 _ERROR_=0 _N_=1

On Jan 8, 2008 2:02 PM, wcw2 <wcw2@cdc.gov> wrote: > sorry....that should be "28-30-0102" on the 2nd line >


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