Date: Sat, 28 Feb 2009 07:32:26 +0530
Reply-To: kedar Shankargouda <kedar.sas@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: kedar Shankargouda <kedar.sas@GMAIL.COM>
Subject: Re: Crack the code
In-Reply-To: <200902271925.n1RBlMqg007490@malibu.cc.uga.edu>
Content-Type: text/plain; charset=windows-1252
ooops , sorry AkshayA for that, you can take this .... EID's are unique and
they are constant ( 200 ) , never get changed . But column position ( value
) may change ....
i am stuck in making a lookup at the first stage .... can somebody help me
technically as to what sas commnd's / loops if any to be used are .... if
some body has already witten this type of code . your effrort in explaning
is highly appreciated .
SAS code written on these lines , would make wonders to me ...
*Mapping Table*
EID COL NaMe COLUMN POSITION
20 DESC1 8
21 DESC2 10
61 DESC3 15
76 DESC4 22
77 DESC5 50
86 DESC7 128
i have just deleted the other 61 to make it unique
On Sat, Feb 28, 2009 at 12:55 AM, kedar B Shankar <kedar.sas@gmail.com>wrote:
> Hi all
>
> i don't know if my query was posted ... so posting it again
> I have a requirement , i tried from my end. Was wondering if anybody could
> help me
>
> IndividualID|EID|EType|EValue
> 001|77||1
> 001|20||0
> 004|20||1
> 001|76||1
> 004|61||0
> 005|86||Y
>
>
> *There can be maximum of "200 EIDs assigned" to one "IndividualID"
>
> Requirements is
>
> There is another table called "Mapping table", where i need to lookup EID
> to
> get the column position
>
> EID COL NaMe COLUMN POSITION
> 20 DESC1 8
> 21 DESC2 10
> 61 DESC3 15
> 76 DESC4 22
> 77 DESC5 50
> 61 DESC6 16
> 86 DESC7 128
>
> The output must be in dataset like
>
>
> IndividualID|1|2|3|4|5|6|7|8|9|.............|10|11|12|..|15|16|...|22...|50|...|128|...|200|
> 001
> ||||||||0|||||..................||....|1|.........|1|||...........
> 004 |||||| |1||||...................................|0|||..........
> 005 |||||||............................................|Y|||||||…
>
>
> Here, for an Individualid 001 , it should lookup to mapping table to get
> the
> column value and then insert it into that particular column.
> This table is fixed and has 200 columns and IndividualID .
>
>
> PLease note that column position can change in the mapping table , so it
> must be lookup to get the value dynamically.
>
>
> CAn anybody help me in cracking this code .... i found it difficult to code
>
>
>
> Thanks in advance
>
> Kedar
>