| Date: | Thu, 25 Jun 2009 11:59:29 -0700 |
| Reply-To: | "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM> |
| Subject: | Re: data manipulation question |
| In-Reply-To: | <c9b05456-1d09-4451-a234-1d48cfa49c3b@g20g2000vba.googlegroups.com> |
| Content-Type: | text/plain; charset="us-ascii" |
Is it really your intent that the "dem." prefix be kept only when the
suffix is "x" or "y"? Or is your intent that the prefix be kept when
var contains only a single "word"? Or only when the suffix is a single
letter? Or is it a typo and you meant to keep the prefix all the time
(or perhaps none of the time)?
-----Original Message-----
From: drraju123
Sent: Thursday, June 25, 2009 7:06 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: data manipulation question
Hi all,
i have a dataset x and i want to convert it into dataset y. please see
below for the required information. thaks for your help.
data x;
length var $60.;
qno = 1;
var = 'dem.x';
output;
qno = 2;
var = 'dem.y';
output;
qno = 3;
var = 'dem.abcde dem.qwertyu dem.asdfghj dem.zxcvb dem.hjkl';
output;
run;
data y;
length var $60.;
qno = 1;
var = 'dem.x';
output;
qno = 2;
var = 'dem.y';
output;
qno = 3;
var = 'abcde';
output;
qno = 3;
var = 'qwertyu';
output;
qno = 3;
var = 'asdfghj';
output;
qno = 3;
var = 'zxcvb';
output;
qno = 3;
var = 'hjkl';
output;
run;
regards,
raju
|