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 (June 2005, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 29 Jun 2005 19:18:34 -0400
Reply-To:   M K <odshtml@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   M K <odshtml@YAHOO.COM>
Subject:   slightly different case for identifying first and second values

Hi Toby

I was able to use SQL to spread values across. Now, I have a slightly different case.

data x; input @1 pt 1. @ 3 bor 1. @5 cradt date7.; cards; 1 . 01JAN04 1 1 01FEB04 1 2 15FEB04 1 1 01MAR04 2 1 01APR04 2 . 01MAY04 2 . 01JUN04 2 1 01JUL04 2 2 01AUG04 2 . 01SEP04 2 2 01OCT04 ; RUN;

say, I need to create two variables BORDT and BORDTC where BORDT=CRADT for the first occurrence of BOR=2 and BORDTC=CRADT for the second occurrence of BOR=2 OR 1

so that my output would look like this

PT BOR CRADT BORDT BORDTC 1 . 01JAN04 1 1 01FEB04 1 2 15FEB04 15FEB04 1 1 01MAR04 01MAR04 2 1 01APR04 2 . 01MAY04 2 . 01JUN04 2 1 01JUL04 2 2 01AUG04 01AUG04 2 . 01SEP04 2 2 01OCT04 01OCT14

Thank you all for your help as always MK


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