<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading words from one data set to another dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119011#M24529</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This probably isn't more efficient depending on your data set but might be easier to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp; pifm.* &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from jessica.&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;PercentImpFEBMar&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; pifm&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;cross join jessica.twowordsfeb twf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;where find(upcase(search_term), upcase(word1))&amp;gt;0 or find(upcase(search_term), upcase(word2))&amp;gt;0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2012 22:27:59 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2012-07-26T22:27:59Z</dc:date>
    <item>
      <title>Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119005#M24523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im trying to read two variables from a dataset and loop them into another dataset until I get to the end of the file. &lt;/P&gt;&lt;P&gt;I am basically outputting to see if these words from the first data set are in any of the observations in the second dataset. &lt;/P&gt;&lt;P&gt;It runs, it just picks up everything.&amp;nbsp; Can anyone show me where my logic has gone wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%global&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; word1 word2;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; jessica.TwoWordsFeb&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; symput(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'word1'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;, Word1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; symput(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'word2'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;, Word2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;CALL&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; SYMPUT( &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'TOTOBS'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; , _N_ );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt;"&gt;/*Runing prxmatch for word groupings*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt;"&gt;/*This looks at user defined particular words in the string*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%MACRO&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;&lt;EM&gt;LOOP&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;TOTOBS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;data temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;set jessica.PercentImpFEBMar&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;if&amp;nbsp;&amp;nbsp; prxmatch(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"/&amp;amp;word1./"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;,search_term) gt &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;and&amp;nbsp; prxmatch(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"/&amp;amp;word2./"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;,search_term) gt &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; then output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;%&lt;STRONG&gt;&lt;EM&gt;loop&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 16:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119005#M24523</guid>
      <dc:creator>guillory21</dc:creator>
      <dc:date>2012-07-26T16:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119006#M24524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is slightly different, but it works. There is no need to use a macro to loop through a dataset. The DATA step does that automatically. I also don't know why your code limited the observations in dataset two to just the number in dataset one or why it read dataset one in twice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call symput('word1', "neiman");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call symput('word2', "marcus");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input search_term $25.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if prxmatch("/&amp;amp;word1./", search_term) gt 0 and prxmatch("/&amp;amp;word2./", search_term) gt 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;Neiman Marcus is here.&lt;/P&gt;&lt;P&gt;neiman marcus is there.&lt;/P&gt;&lt;P&gt;Neiman not Marcus&lt;/P&gt;&lt;P&gt;neiman Marcus&lt;/P&gt;&lt;P&gt;Neiman marcus&lt;/P&gt;&lt;P&gt;neiman marcus&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 16:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119006#M24524</guid>
      <dc:creator>tish</dc:creator>
      <dc:date>2012-07-26T16:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119007#M24525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tish,&lt;/P&gt;&lt;P&gt;But this is slightly different because my words aren't restricted to just "Neiman" and "marcus".&amp;nbsp; I have 2 variables in dataset one (word1 and word2) that I need to loop through another data set to check for all words. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for each word1, word2 combination, I need these words to loop through &lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;jessica.PercentImpFEBMar to see if each word1, word 2 pair is in any of the observations.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 18:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119007#M24525</guid>
      <dc:creator>guillory21</dc:creator>
      <dc:date>2012-07-26T18:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119008#M24526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if I correctly understand what you are trying to do but, hopefully, the following will at least provide you with an idea on how you might achieve what you are trying to accomplish:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data TwoWordsFeb;&lt;BR /&gt;&amp;nbsp; input words $20.;&lt;BR /&gt;&amp;nbsp; cards;&lt;BR /&gt;neiman&lt;BR /&gt;marcus&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;&amp;nbsp; select words into :word1 separated by ' '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from TwoWordsFeb;&lt;BR /&gt;&amp;nbsp; select words into :word1-:word&amp;amp;sqlobs.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from TwoWordsFeb&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;quit;&lt;BR /&gt;%let numrecs=&amp;amp;sqlobs.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data PercentImpFEBMar;&lt;BR /&gt;&amp;nbsp; informat search_term $50.;&lt;BR /&gt;&amp;nbsp; input search_term &amp;amp;;&lt;BR /&gt;&amp;nbsp; cards;&lt;BR /&gt;Neiman Marcus is here.&lt;BR /&gt;neiman marcus is there.&lt;BR /&gt;Neiman not Marcus&lt;BR /&gt;neiman Marcus&lt;BR /&gt;Neiman marcus&lt;BR /&gt;neiman marcus&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro loop;&lt;BR /&gt;&amp;nbsp; data want (drop=x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set PercentImpFEBMar;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=1;&lt;BR /&gt; %do i=1 %to &amp;amp;numrecs.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=x*prxmatch("/&amp;amp;&amp;amp;word&amp;amp;i./", search_term);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if x;&lt;BR /&gt;&amp;nbsp; run;&lt;BR /&gt;%mend;&lt;BR /&gt;%loop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 18:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119008#M24526</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-07-26T18:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119009#M24527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Art. This is my first contact with SQL automatic macro variable 'sqlobs', 'noprint' options here is a bit tricky, while it worked perfectly with the creation of macro variables. Nice to learn!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 21:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119009#M24527</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-07-26T21:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119010#M24528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Haikuo: glad you found it useful.&amp;nbsp; Just keep in mind: I'm a Psychologist NOT a programmer!&amp;nbsp; There are probably more efficient ways available to accomplish the same thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 22:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119010#M24528</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-07-26T22:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119011#M24529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This probably isn't more efficient depending on your data set but might be easier to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp; pifm.* &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from jessica.&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;PercentImpFEBMar&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; pifm&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;cross join jessica.twowordsfeb twf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;where find(upcase(search_term), upcase(word1))&amp;gt;0 or find(upcase(search_term), upcase(word2))&amp;gt;0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 22:27:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119011#M24529</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-07-26T22:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reading words from one data set to another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119012#M24530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure whether I understand your question totally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data word;
&amp;nbsp; input word1 : $20. word2 : $20.;
&amp;nbsp; cards;
ns ma
ma xd
;
run;
data have;
&amp;nbsp; input search_term $20.;
&amp;nbsp; cards;
nssdsma
asdansasa
smadshxdwe
sduso
;
run;

proc sql;
create table want as
 select distinct search_term
&amp;nbsp; from have,word
&amp;nbsp;&amp;nbsp; where search_term contains strip(word1) and search_term contains strip(word2)
;
quit;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 04:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-words-from-one-data-set-to-another-dataset/m-p/119012#M24530</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-07-27T04:21:59Z</dc:date>
    </item>
  </channel>
</rss>

