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 (May 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 27 May 2009 07:55:58 -0400
Reply-To:     Nathaniel.Wooding@DOM.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject:      Re: removing a string
Comments: To: Annie Lee <hummingbird10111@HOTMAIL.COM>
In-Reply-To:  <>
Content-Type: text/plain; charset="US-ASCII"


Try the following:

Data annie; filename indd 'c:\park\annie.txt'; infile indd truncover; informat num 8. dept $40.; input num dept & ; where = index( dept , '&' ); drop where; if where then Dept = catx( ' ' , substr( dept , 1 , where ) , substr( dept , where + 5 ));


Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977

Annie Lee <hummingbird10111 @HOTMAIL.COM> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject removing a string

05/27/2009 05:53 AM

Please respond to Annie Lee <hummingbird10111 @HOTMAIL.COM>


I would like to extract and remove a string (&amp;) from a variable. I would appreciate it if anyone can offer any advice!


num Dept 1 IT HR 2 IT Education &amp; Service 3 IT Catering 4 Media HR 5 Media Receiving &amp; Delivery


num Dept 1 IT HR 2 IT Education & Service 3 IT Catering 4 Media HR 5 Media Receiving & Delivery

CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.

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