Hi, I'm a newbie to SAS I have 2 datasets, and I want to accomplish as below. data one; input Description $80.; cards; Orange Test - Orange, All Ages - Capital Test Apple ABC - <20, Male - Capital Test Pear ABC - <20, Male - Capital Test Apple - 21+ Years, Female - Capital Pear Eligible Test - Pear Eligible, All Ages - Region Pear Test - Pear Eligible, All Ages - Region Other SBH - Other, All Ages - South Central ; data two; input key1 $ key2 $; cards; CAPITAL APPLE CAPITAL PEAR CAPITAL OTHER CAPITAL ORANGE REGION SSI REGION PEAR SOUTH OTHER ; Output should look like this. List out all descriptions that contain both key1 and key2 values : key1 key2 Descr CAPITAL APPLE Test Apple ABC - <20, Male - Capital CAPITAL APPLE Test Apple - 21+ Years, Female - Capital CAPITAL PEAR Test Pear ABC - <20, Male - Capital CAPITAL OTHER not found CAPITAL ORANGE Orange Test - Orange, All Ages - Capital REGION SSI not found REGION PEAR Pear Eligible Test - Pear Eligible, All Ages - Region REGION PEAR Pear Test - Pear Eligible, All Ages - Region SOUTH OTHER Other SBH - Other, All Ages - South Central I have tried findw "if findw(one.Description,two.key1)>0 and findw(one.Description,two.key2)>0 then Descr=one.Description else Descr= 'not found' ", but it does not work. I really appreciate your help. Thank you in advance!
... View more