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 (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 17 Jul 2006 13:34:16 -0400
Reply-To:   Jack Clark <JClark@CHPDM.UMBC.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jack Clark <JClark@CHPDM.UMBC.EDU>
Subject:   Re: A SIMPLE BUT LITTLE TRICKY DATAMANUPULATION QUESTION
Comments:   To: Rathindronath <mehedisas@YAHOO.COM>
Content-Type:   text/plain

Rathindronath,

I am assuming the alignment of the data is how you presented it and simply checking the first byte of the character field VAR2 to see if it is blank.

See if this code is something you can use. Good luck.

Jack

data test (drop=var3 space_check); retain var3; infile cards missover; input @01 space_check $1. @01 var2 $char20. ; if space_check ne ' ' then var3 = var2; var1 = var3; cards; cardio Absent Present N/A Body Absent Present Headec Absent Present Not Necessay ; run;

proc print data = test; run;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Rathindronath Sent: Monday, July 17, 2006 1:09 PM To: SAS-L@LISTSERV.UGA.EDU Subject: A SIMPLE BUT LITTLE TRICKY DATAMANUPULATION QUESTION

I have a datset as follows ( a part of a large datset):

VAR2 ____

cardio Absent Present N/A Body Absent Present Headec Absent Present Not Necessay

I need a datset as follows ( result):

VAR1 VAR2 ____ ____

cardio cardio cardio Absent cardio Present cardio N/A Body Body Body Absent Body Present Headec Headec Headec Absent Headec Present Headec Not Necessay

Can anyone please help me out? It's a very large dataset with about 6000 observations. I just gave you a part of it. Thanks in advance.


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