Date: Wed, 1 Aug 2007 15:33:14 +0530
Reply-To: Diwakar_Sharma@MCKINSEY.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Diwakar Sharma <Diwakar_Sharma@MCKINSEY.COM>
Subject: Re: It is very very simple question reading data in sas
In-Reply-To: <1185961143.936738.311550@i38g2000prf.googlegroups.com>
Content-Type: text/plain; charset="US-ASCII"
Try this
data inp;
infile datalines dlm='#';
length all $256;
input all;
age=scan(all,-1);
name=substr(all,1,length(all)-length(age));
drop all;
cards;
ffc ffc ffc 23
ksds 24
dsfasdfsdf 34
ss ss ss 45
;
run;
Diwakar
reddy <mail2karna@GMAIL.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
08/01/2007 03:09 PM
Please respond to
reddy <mail2karna@GMAIL.COM>
To
SAS-L@LISTSERV.UGA.EDU
cc
Subject
It is very very simple question reading data in sas
I have two variables name and age.
data is
cards;
ffc ffc ffc 23
ksds 24
dsfasdfsdf 34
ss ss ss 45
;
i want output like this
name age
ffc ffc ffc 23
ksds 24
dsfasdfsdf 34
ss ss ss 45
could u please help any one
Thanks in advance
s.karunakar
Mail: mail2karna@gmail.com
+=========================================================+
This message may contain confidential and/or privileged
information. If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein. If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
+=========================================================+