<?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: Check whether %include statement is exist in SAS code or not in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460358#M117009</link>
    <description>&lt;P&gt;Since you can log on with ftp, you can also get a commandline with PuTTY or similar.&lt;/P&gt;
&lt;P&gt;Run the following:&lt;/P&gt;
&lt;PRE&gt;find /sas/cpm/dev/code -name \*.sas -exec grep /sas/dev/compare.sas {} \; -print&lt;/PRE&gt;
&lt;P&gt;and you'll get all occurrences, followed by the respective filename.&lt;/P&gt;
&lt;P&gt;If you want to further process the result, redirect the output into a file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The origins of UNIX are in text processing, and it is&amp;nbsp;&lt;EM&gt;e&lt;/EM&gt;&lt;EM&gt;xtremely powerful&lt;/EM&gt; at that. Not making use of that power is silly at best.&lt;/P&gt;</description>
    <pubDate>Mon, 07 May 2018 07:28:03 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-05-07T07:28:03Z</dc:date>
    <item>
      <title>Check whether %include statement is exist in SAS code or not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460349#M117006</link>
      <description>&lt;P&gt;I have SAS code in which there is following line of code is included&lt;/P&gt;&lt;P&gt;% include "/sas/dev/compare.sas";&lt;/P&gt;&lt;P&gt;it is at location on server /sas/cpm/dev/code&lt;/P&gt;&lt;P&gt;So, at present what I am doing manually go to above path(through FTP) and open each .sas code(in a Folder, you can say there are 4 codes location at /sas/cpm/dev/code) and check whether %include "/sas/dev/compare.sas" line of code is present or not in.sas code&lt;/P&gt;&lt;P&gt;Can anyone help me without checking/open manually .sas code how to check whether %include "/sas/dev/compare.sas"; is exist or not&lt;/P&gt;&lt;P&gt;Can anyone , please help me how to write in sas, We can pass each code through macro right&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 05:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460349#M117006</guid>
      <dc:creator>harry_87</dc:creator>
      <dc:date>2018-05-07T05:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Check whether %include statement is exist in SAS code or not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460350#M117007</link>
      <description>&lt;P&gt;.SAS files are text files, you can open with any text editor. So you’re basically searching a text file for a string, which you can do via grep in Unix or using FIND in SAS. You’ll find many examples if you use 'find specific text in a file' rather than your very specific question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/26cf789d6da0ce941e447022fdccf0f4" target="_blank"&gt;https://gist.github.com/statgeek/26cf789d6da0ce941e447022fdccf0f4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208227"&gt;@harry_87&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I have SAS code in which there is following line of code is included&lt;/P&gt;
&lt;P&gt;% include "/sas/dev/compare.sas";&lt;/P&gt;
&lt;P&gt;it is at location on server /sas/cpm/dev/code&lt;/P&gt;
&lt;P&gt;So, at present what I am doing manually go to above path(through FTP) and open each .sas code(in a Folder, you can say there are 4 codes location at /sas/cpm/dev/code) and check whether %include "/sas/dev/compare.sas" line of code is present or not in.sas code&lt;/P&gt;
&lt;P&gt;Can anyone help me without checking/open manually .sas code how to check whether %include "/sas/dev/compare.sas"; is exist or not&lt;/P&gt;
&lt;P&gt;Can anyone , please help me how to write in sas, We can pass each code through macro right&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 06:05:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460350#M117007</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-07T06:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Check whether %include statement is exist in SAS code or not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460358#M117009</link>
      <description>&lt;P&gt;Since you can log on with ftp, you can also get a commandline with PuTTY or similar.&lt;/P&gt;
&lt;P&gt;Run the following:&lt;/P&gt;
&lt;PRE&gt;find /sas/cpm/dev/code -name \*.sas -exec grep /sas/dev/compare.sas {} \; -print&lt;/PRE&gt;
&lt;P&gt;and you'll get all occurrences, followed by the respective filename.&lt;/P&gt;
&lt;P&gt;If you want to further process the result, redirect the output into a file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The origins of UNIX are in text processing, and it is&amp;nbsp;&lt;EM&gt;e&lt;/EM&gt;&lt;EM&gt;xtremely powerful&lt;/EM&gt; at that. Not making use of that power is silly at best.&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 07:28:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460358#M117009</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-07T07:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Check whether %include statement is exist in SAS code or not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460623#M117101</link>
      <description>&lt;P&gt;I will try this&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 04:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Check-whether-include-statement-is-exist-in-SAS-code-or-not/m-p/460623#M117101</guid>
      <dc:creator>harry_87</dc:creator>
      <dc:date>2018-05-08T04:48:52Z</dc:date>
    </item>
  </channel>
</rss>

