Dear SAS Folks, I seek your help in solving my problem that requires a look up solution of row to column values or column to row for my given wide datasets. My datasets have values like the following: Table A: ID Type1 type2 type3 type4 type5 type6 type7 type8 type9 type10 type11 type12 type13 type14 type15 ABC01 25 N ABC01 25 N A1 ABC01 11 Y A5 ABC01 55 k T1 JKL03 39 N A5 JKL03 41 Y A5 JKL03 40 N T1 JKL03 39 Y A1 Table B: ID Type1 type2 type3 type4 type5 type6 type7 type8 type9 type10 type11 type12 type13 type14 type15 ABC01 25,11,35,45 N,Y T1,A1,A5 JKL03 39,40 N T1,A1 Desired Results: ID Type1 type2 type3 type4 type5 type6 type7 type8 type9 type10 type11 type12 type13 type14 type15 ABC01 25 N A1 ABC01 11 Y A5 JKL03 40 N T1 The logic for the look up is as follows: 1. Table A has so many by-groups with many observations as seen with couple of examples ABC01 and JKL03. 2. Table B is basically the data set that basically provides or defines information on what observations to be picked from Table A. 3. The look up has be to be done type to type, find a match and if present output that to the results dataset. 4. In the first row in table A: Type1 with valuye of 25 matches with one of the value being 25 in type1 in Table B for the same ID, so this is OK. Similarly,Type2 value N of table A matches with N of type2 in table B. However, Type3 value is missing in tableA which should actually have values T1,A1 or A5 as listed in the type3 of table B. 5. Therefore, desired results should write the observations where there is either or one match found as shown in results table. The same rules applies to all types for a complete look up. Can somebody help me with this challenge? It seems too daunting. Many thanks, Charlotte
... View more