<?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: Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761739#M241081</link>
    <description>&lt;P&gt;Please provide:&lt;/P&gt;
&lt;P&gt;- A proper title&lt;/P&gt;
&lt;P&gt;- A proper explanation&lt;/P&gt;
&lt;P&gt;- An example of what you have (what is "&lt;SPAN&gt;the sas files used in a sas code&amp;nbsp;" ?)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- An example of what you want (what is "the list which has sas file n domain as a naming" ? )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Spending a few seconds to haphazardly&amp;nbsp;throw together incomplete words in the hope that they make sensible sentences, and then expecting volunteers to spend time guessing your needs and providing a thoughtful and comprehensive&amp;nbsp;reply is unrealistic to say the least.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 07:01:18 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-08-16T07:01:18Z</dc:date>
    <item>
      <title>Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761732#M241077</link>
      <description>Want to compare the sas files used in a sas code with the list which has sas file n domain as a naming .can we hav a macro in place</description>
      <pubDate>Mon, 16 Aug 2021 05:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761732#M241077</guid>
      <dc:creator>Stephenjohn</dc:creator>
      <dc:date>2021-08-16T05:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761736#M241079</link>
      <description>&lt;P&gt;If you don't want to write the code yourself, you have to hire someone or search for code that you can adept to your needs.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 06:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761736#M241079</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-08-16T06:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761739#M241081</link>
      <description>&lt;P&gt;Please provide:&lt;/P&gt;
&lt;P&gt;- A proper title&lt;/P&gt;
&lt;P&gt;- A proper explanation&lt;/P&gt;
&lt;P&gt;- An example of what you have (what is "&lt;SPAN&gt;the sas files used in a sas code&amp;nbsp;" ?)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- An example of what you want (what is "the list which has sas file n domain as a naming" ? )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Spending a few seconds to haphazardly&amp;nbsp;throw together incomplete words in the hope that they make sensible sentences, and then expecting volunteers to spend time guessing your needs and providing a thoughtful and comprehensive&amp;nbsp;reply is unrealistic to say the least.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 07:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761739#M241081</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-16T07:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761751#M241086</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/393492"&gt;@Stephenjohn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to the SAS Communities! Guess people haven't realized that you're new to this forum else your welcome would have been a bit warmer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help us help you and try to formulate the problem as clear as you can also providing the necessary detail.&lt;/P&gt;
&lt;P&gt;A lot of people here are also more than happy to share actual and tested code. You just need to provide representative sample data for this (as a SAS data step creating such data and not as a screenshot please!) and eventually the code you've already tried. Even if such code isn't properly working it's still often very helpful to get to better understand where you are coming from.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 08:21:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761751#M241086</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-08-16T08:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761756#M241088</link>
      <description>&lt;P&gt;Please find the example below of the requirement i am looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex: this is a sas code where i am taking data from a lib raw which has have and bright.. I want to check whether HAVE and BRIGHT are used in the particular code(want.sas file). I have a list to compare in the form of an excel.. Can we have a macro to find this ..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stephenjohn_0-1629105843410.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62618i1A2FD894D243612B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stephenjohn_0-1629105843410.png" alt="Stephenjohn_0-1629105843410.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stephenjohn_1-1629106068675.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62619i7294C19D13CAC748/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stephenjohn_1-1629106068675.png" alt="Stephenjohn_1-1629106068675.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 09:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761756#M241088</guid>
      <dc:creator>Stephenjohn</dc:creator>
      <dc:date>2021-08-16T09:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761761#M241091</link>
      <description>&lt;P&gt;So, you want to analyse your sas-code files.&lt;/P&gt;
&lt;P&gt;What exactly do you expect as result?&lt;/P&gt;
&lt;P&gt;How do you identify the datasets you want to find?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 10:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761761#M241091</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-08-16T10:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761764#M241092</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/393492"&gt;@Stephenjohn&lt;/a&gt;&amp;nbsp;Put yourself into the shoes of someone who doesn't know anything about what you have and the problem you need to solve. Do you believe your description would be sufficient for you to understand?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also PLEASE don't post sample data as screenshots. Use the following two icons to share text&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1629108893168.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62620iDD9B8CAE5ECD8E05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1629108893168.png" alt="Patrick_0-1629108893168.png" /&gt;&lt;/span&gt;&amp;nbsp;- something we can actually copy/paste into code.&lt;/P&gt;
&lt;P&gt;If you have an Excel then you can attach it - but please be aware that a lot of people won't download Excels for security concerns so much better is to provide such data via a working SAS datastep creating the data (you can provide such code via the running man icon&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1629109094780.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62621iFA8CE66AD43A9795/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_1-1629109094780.png" alt="Patrick_1-1629109094780.png" /&gt;&lt;/span&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're asking for "a macro" (=code) so you need to provide to us as much of the source data as you can in a form where we don't have to spend the time to prepare the data for you but can spend the time for answering your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And last but not least: It's in my experience really worth to spend the time for clearly formulating the problem. To clearly define the problem is already half of the solution. It happened to me more than once that while trying to formulate a clear question for the forum I actually got the clarity in my mind to solve the problem myself.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that makes sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 10:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761764#M241092</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-08-16T10:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761771#M241099</link>
      <description>&lt;P&gt;i have to find a text from the sas codes and compare it with the excel file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;eg:&amp;nbsp; below is a sas file named &lt;STRONG&gt;AE.sas&lt;/STRONG&gt; and i want to find '&lt;STRONG&gt;raw.ae&lt;/STRONG&gt;' from this code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table ae_supp as&lt;BR /&gt;select a.*,b.* from raw.ae&lt;/P&gt;&lt;P&gt;as a inner join suppae_act as b on a.usubjid=b.usubjid1 and a.aeseq=b.idvarval;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to identify the which text needs to be searched in the sas file we have a excel file as below.&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sas file&lt;/P&gt;&lt;P&gt;raw.ae&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AE.sas&lt;/P&gt;&lt;P&gt;raw.cm&amp;nbsp; &amp;nbsp; &amp;nbsp;CM.sas&lt;/P&gt;&lt;P&gt;raw.ae&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ho.sas&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 11:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761771#M241099</guid>
      <dc:creator>Stephenjohn</dc:creator>
      <dc:date>2021-08-16T11:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761780#M241102</link>
      <description>&lt;P&gt;Thanks, this is clearer.&amp;nbsp; I wouldn't think about a macro yet, I would start with thinking about how you would check one .sas file to see if it has a string in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I think the first step could be to write a program that would search the file AE.sas, to see if it has the string "raw.ae" in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried writing that program?&amp;nbsp; This could be done with a SAS data step (reading AE.sas as a data file).&amp;nbsp; Or could be done with other languages.&amp;nbsp; I'd suggest you try writing a DATA step to read that file and parse it.&amp;nbsp; You could also try searching lexjansen.com for papers about SAS log scanners.&amp;nbsp; The log scanners typically read in a .log file and search for specific words.&amp;nbsp; Both a .log file and a .sas file are just text files.&amp;nbsp; So the approach used by a log scanner to search for a string should also work for scanning a .sas file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have a working approach for scanning one file, you can move on to automating it with a macro, or CALL EXECUTE, or similar.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 12:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761780#M241102</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-08-16T12:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761786#M241105</link>
      <description>&lt;P&gt;I tried with the below program.. but this can give only 1 search at a time...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had to write the macro Search n number of times to get an output in different datasets..and then append and then compare with the excel file.. if there is a way to find multiple strings from multiple sas files stored in one path that would help.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro search(results,dataset,input);&lt;BR /&gt;%let root= path;&lt;BR /&gt;filename finp ("&amp;amp;root./&amp;amp;input..sas");&lt;/P&gt;&lt;P&gt;data &amp;amp;results.;&lt;BR /&gt;length fname _filepath frname $200;&lt;BR /&gt;infile finp filename = _filepath eov=_eov truncover;&lt;BR /&gt;input a_line $200.;&lt;BR /&gt;fname =compress(scan(_filepath,-1,'\'),".sas");&lt;BR /&gt;&lt;BR /&gt;if _eov=1 then do;&lt;BR /&gt;_n=0;&lt;BR /&gt;_eov=0;&lt;BR /&gt;end;&lt;BR /&gt;_n+1;&lt;BR /&gt;frname=compress(scan(a_line,-1,'.'),';');&lt;BR /&gt;if find(a_line,"&amp;amp;dataset.",'i')&lt;BR /&gt;then output;&lt;BR /&gt;&lt;BR /&gt;keep _n fname frname;&lt;BR /&gt;run;&lt;BR /&gt;%mend search;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 12:48:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761786#M241105</guid>
      <dc:creator>Stephenjohn</dc:creator>
      <dc:date>2021-08-16T12:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761787#M241106</link>
      <description>&lt;P&gt;It is still not clear, what you expect as result.&lt;/P&gt;
&lt;P&gt;In the meantime start as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; suggested: write a data step that reads a program-file searching for the name of a dataset. Don't waste time on creating a macro, you won't need it.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 12:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761787#M241106</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-08-16T12:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761795#M241110</link>
      <description>&lt;P&gt;Does that macro you wrote work for searching one file for one string?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would think it would be possible to write a DATA step that would read in a list of files, and search each of them for a string.&amp;nbsp; But the hassle would be that you would need to manage the lookup of which string should be looked for in each file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that macro works for one file, I would look into using CALL EXECUTE.&amp;nbsp; &amp;nbsp;You could&amp;nbsp; read in the Excel file which has one row for each file to search, and lists the file name and the string to search for. And CALL EXECUTE would call your macro once for each row, passing in the as parameters the values in the columns "raw file" and "sas code."&amp;nbsp; &amp;nbsp;You would get one output file from each search, but you could use PROC APPEND (probably inside the macro), so that each time you call the macro it does the search, and adds a record with the results of that search.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 13:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761795#M241110</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-08-16T13:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761881#M241156</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Easy:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If the team members who coded the SAS programs religiously used "&lt;SPAN&gt;valid two-level SAS names&lt;/SPAN&gt;".&amp;nbsp; Then writing SAS code to open all SAS code files and do string searches will work.&amp;nbsp; This is still difficult, but this is the best case scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno_SAS wrote useful code here to bring multiple text files into a dataset.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Read-all-text-files-into-one-dataset/m-p/196449/highlight/true#M36895" target="_blank"&gt;Solved: Re: Read all text files into one dataset - SAS Support Communities&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Hard:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;They did not use &lt;SPAN&gt;valid two-level SAS names:&lt;/SPAN&gt;&amp;nbsp; I would begin with familiarizing myself PROC SCAPROC.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 18:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761881#M241156</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-08-16T18:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761912#M241173</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/393492"&gt;@Stephenjohn&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i have to find a text from the sas codes and compare it with the excel file&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which suggests that providing an example of the Excel file (not best) or a data set created from the Excel file would be a good idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some additional thoughts: is the Excel to search for text case sensitive? Meaning that if you are looking for "Raw" that "raw" would not be a match? If the search is not case sensitive then you would want to make sure to use an insensitive approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually the "tricky" part is getting the two pieces of information, the Excel to search for list, and the SAS code into data sets.&lt;/P&gt;
&lt;P&gt;Here is one example of "matching" based on a word in one data set present in another.&lt;/P&gt;
&lt;PRE&gt;data example;
   input name $;
datalines;
John
Johnny
Mary
;

data example2;
  input phrase $35.;
datalines;
Johnny planted apple trees
My name is Phred
Sally sells sea shells
Parsly Sage Rosemary  and thyme
I met Mary on Saturday
;

proc sql;
   create table matched as
   select a.name,b.phrase
   from example as a, example2 as b
   where indexw(b.phrase,a.name)&amp;gt;0
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;So if the data set with the SAS code has a variable that holds the code file name then you could select the variable holding that name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you need to determine in the number of times a value appears is important as the above sort of match will find all the matches. Typically data sets and such are referenced multiple times. If you only one result then that is important to know. You could also read the SAS code file(s) and get a line number to tell where exactly the the match(es) occur if needed.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 20:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761912#M241173</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-16T20:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761934#M241177</link>
      <description>&lt;P&gt;It's a lot easier to help you when you provide all the information.&lt;/P&gt;
&lt;P&gt;This does what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data TEXT;
  input TEXT $ FILENAME $;
cards;
raw.ae AE.sas
raw.cm CM.sas
raw.ae ho.sas
run;

data CHECK;
  set TEXT;
  infile IN filevar=FILENAME end=EOF;
  do until (EOF);
    input;
    if find(_INFILE_, TEXT, 't') then output;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please adapt to your needs and report. The path is most likely missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 22:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761934#M241177</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-16T22:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761975#M241193</link>
      <description>&lt;P&gt;How will i assign a path in this code to check for the file names.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 06:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761975#M241193</guid>
      <dc:creator>Stephenjohn</dc:creator>
      <dc:date>2021-08-17T06:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761978#M241196</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;How will i assign a path in this code to check for the file names.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Add it in the FILENAME variable.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 06:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761978#M241196</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-17T06:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761979#M241197</link>
      <description>&lt;P&gt;Also see if you need the string search to be case insensitive. Look at 'i' value for third parameter for the FIND() function&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 06:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/761979#M241197</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-17T06:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/762073#M241243</link>
      <description>&lt;P&gt;Thank you. that was helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 14:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/762073#M241243</guid>
      <dc:creator>Stephenjohn</dc:creator>
      <dc:date>2021-08-17T14:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to seach for a text in the code and compare the same with the excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/762080#M241244</link>
      <description>&lt;P&gt;Note that when using the FILEVAR= option it is better to use DO WHILE() instead of DO UNTIL() to avoid any empty file in the list causing the data step to stop early because it read past the end the input file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  infile IN filevar=FILENAME end=EOF;
  do while (not EOF);
    input;
    if find(_INFILE_, TEXT, 't') then output;
  end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 14:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/762080#M241244</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-17T14:48:51Z</dc:date>
    </item>
  </channel>
</rss>

