<?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: execute sas codes in particular location in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608956#M177264</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have all sascode files saved in c drive.&lt;/P&gt;&lt;P&gt;i have to run all sascodes files one by one automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 07:23:02 GMT</pubDate>
    <dc:creator>suhas1</dc:creator>
    <dc:date>2019-12-03T07:23:02Z</dc:date>
    <item>
      <title>execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608944#M177253</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have 20 sas codes saved in c:/fc/sascd1.sas paricular location.&lt;/P&gt;&lt;P&gt;how i have to execute all sas codes at a time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 06:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608944#M177253</guid>
      <dc:creator>suhas1</dc:creator>
      <dc:date>2019-12-03T06:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608945#M177254</link>
      <description>&lt;P&gt;Do you want to run them in any specific order?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 06:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608945#M177254</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-12-03T06:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608946#M177255</link>
      <description>&lt;P&gt;On a UNIX system, I'd have a script like&lt;/P&gt;
&lt;PRE&gt;cd /location
for PNAME in *.sas
do
  /sasconf/Lev1/SASApp/BatchServer/sasbatch.sh /location/$PNAME
done&lt;/PRE&gt;
&lt;P&gt;On a Windows system, you do the same (logically), but the shell script syntax will be different (unless you have bash available).&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 06:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608946#M177255</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-03T06:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608947#M177256</link>
      <description>I am not sure what you mean to execute all sas codes at a time, since the sas session is only once you can execute the sas codes one after another in the order of the sas codes, but cannot execute all at once. &lt;BR /&gt;&lt;BR /&gt;If you meant to execute all sas codes in a location one after another you can batch submit the codes via unix/linux session, hope you are working in unix/linux environment. &lt;BR /&gt;&lt;BR /&gt;The way to do this is as follows &lt;BR /&gt;prepare a batch file with .sh extension where you have the sas filenames one after another as below &lt;BR /&gt;&lt;BR /&gt;sas file1.sas &lt;BR /&gt;sas file2.sas &lt;BR /&gt;sas file3.sas&lt;BR /&gt;&lt;BR /&gt;and then from the unix terminal run the file with sh command&lt;BR /&gt;&lt;BR /&gt;sh file.sh</description>
      <pubDate>Tue, 03 Dec 2019 06:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608947#M177256</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-12-03T06:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608949#M177257</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have to run those sas codes one after another&lt;/P&gt;&lt;P&gt;how to do in sas programming?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 06:45:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608949#M177257</guid>
      <dc:creator>suhas1</dc:creator>
      <dc:date>2019-12-03T06:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608950#M177258</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/301827"&gt;@suhas1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have to run those sas codes one after another&lt;/P&gt;
&lt;P&gt;how to do in sas programming?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is there a specific order, or do we simply run all .sas files in a directory as retrieved with a directory listing?&lt;/P&gt;
&lt;P&gt;If there is an order, create a dataset with the program names and do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set myprograms;
call execute(cats('%include "',progname,'";'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Dec 2019 07:02:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608950#M177258</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-03T07:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608956#M177264</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have all sascode files saved in c drive.&lt;/P&gt;&lt;P&gt;i have to run all sascodes files one by one automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 07:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608956#M177264</guid>
      <dc:creator>suhas1</dc:creator>
      <dc:date>2019-12-03T07:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608957#M177265</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/301827"&gt;@suhas1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have all sascode files saved in c drive.&lt;/P&gt;
&lt;P&gt;i have to run all sascodes files one by one automatically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;See my code example.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 07:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608957#M177265</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-03T07:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608960#M177268</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/301827"&gt;@suhas1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest way to execute SAS code stored in an external SAS file is to use an %include statement. This just makes the code available to the programs you're running. If using multiple %include statements then it executes everything sequentially in a single SAS session - exactly in the same way it would if you'd copied all the code into a single file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include 'c:\&amp;lt;some path&amp;gt;\myprog1.sas' / source2;
%include 'c:\&amp;lt;some path&amp;gt;\myprog2.sas' / source2;
%include 'c:\&amp;lt;some path&amp;gt;\myprog3.sas' / source2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To include external .sas files they must be accessible from the location where SAS executes (your SAS server). As you write "c-drive" I assume these .sas files are on your local machine and though you will need a local SAS installation for things to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 08:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608960#M177268</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-12-03T08:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608978#M177279</link>
      <description>&lt;P&gt;What do you mean by&amp;nbsp;&lt;STRONG&gt;sas code&lt;/STRONG&gt; ?&lt;/P&gt;
&lt;P&gt;How are the sas codes organized in the&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;c:/fc/sascd1.sas&lt;/SPAN&gt;&lt;/STRONG&gt; ?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;c:/fc/sascd1.sas &lt;/SPAN&gt;&lt;/STRONG&gt;is one file - is it an example out of 20 files or one file that contains all 20 sas codes?&lt;/P&gt;
&lt;P&gt;Is&amp;nbsp;&lt;STRONG&gt;sas code&lt;/STRONG&gt; a macro program or not ? are all sas codes macro programs ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 08:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/608978#M177279</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-12-03T08:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas codes in particular location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/609018#M177293</link>
      <description>&lt;PRE&gt;%include 'c:\&amp;lt;some path&amp;gt;\*.sas' / source2;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Dec 2019 11:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-codes-in-particular-location/m-p/609018#M177293</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-12-03T11:41:06Z</dc:date>
    </item>
  </channel>
</rss>

