Date: Thu, 4 Jun 2009 19:36:05 -0400
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: Separating Two Words into Two Variables
Content-Type: text/plain; charset="US-ASCII"
For this, use the scan function.
If A = 'Apple District';
A1 = Scan( A , 1);
A2 = Scan(A , 2 , ' ');
Since a blank is the seperator, you do not have to specify the third term
in the function but you may if you wish.
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Cel Phone: 804-205-0752
Sent by: "SAS(r) To
Separating Two Words into Two
06/04/2009 06:39 Variables
Please respond to
How do I create two variables from a variable that contains
observations with two words?
For example, if a=Apple District how would I create a1=Apple and
or if a=Green Region how would I create a1=Green and a2=Region?
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.