<?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: Running Stata from within SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874383#M345471</link>
    <description>&lt;P&gt;You need to first make up the stata sub-task so that it can be executed from one commandline command.&lt;/P&gt;
&lt;P&gt;Then you can run that sub-task from within SAS like this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile "your_stata_commandline_here 2&amp;gt;&amp;amp;1" pipe;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All messages from the stata execution (information, output and diagnostic) will end up in the SAS log. The X statement will not provide this information.&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2023 05:04:03 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-05-08T05:04:03Z</dc:date>
    <item>
      <title>Running Stata from within SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874358#M345452</link>
      <description>&lt;P&gt;Is there any ways to run Stata from within SAS? I have Stata installed on my PC.&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 21:17:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874358#M345452</guid>
      <dc:creator>BayzidurRahman</dc:creator>
      <dc:date>2023-05-07T21:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Running Stata from within SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874361#M345453</link>
      <description>&lt;P&gt;Where is your SAS installed? If you have SAS installed on your PC you can start Stata from SAS using the X command. Not sure why you would want to do that rather than just starting Stata manually.&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 21:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874361#M345453</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-07T21:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Running Stata from within SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874362#M345454</link>
      <description>&lt;P&gt;SAS is also installed on the same PC.&lt;BR /&gt;I am doing a long data processing job. Most of the tasks will be performed in SAS. Stata is very efficient to perform an intermediate task. Thus, I want to use Stata from within SAS to do that specific job and then import the generated data into SAS to do the remaining task. Can you please give an example of the x command?&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 22:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874362#M345454</guid>
      <dc:creator>BayzidurRahman</dc:creator>
      <dc:date>2023-05-07T22:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Running Stata from within SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874363#M345455</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x 'dir c:\*.*';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The X command allows you to run any command that works from a Windows command line. Within the quotes you just need to substitute the Stata command you wish to run. Test it first from a Windows command line or command window and once it works you can paste the command into your SAS program.&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 22:11:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874363#M345455</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-07T22:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Running Stata from within SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874383#M345471</link>
      <description>&lt;P&gt;You need to first make up the stata sub-task so that it can be executed from one commandline command.&lt;/P&gt;
&lt;P&gt;Then you can run that sub-task from within SAS like this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile "your_stata_commandline_here 2&amp;gt;&amp;amp;1" pipe;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All messages from the stata execution (information, output and diagnostic) will end up in the SAS log. The X statement will not provide this information.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 05:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874383#M345471</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-08T05:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Running Stata from within SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874400#M345476</link>
      <description>&lt;P&gt;Sorry- I am still not clear about it. An example would have been great.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 07:53:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874400#M345476</guid>
      <dc:creator>bayzid</dc:creator>
      <dc:date>2023-05-08T07:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Running Stata from within SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874404#M345478</link>
      <description>&lt;P&gt;You must first find out how to run your stata task in batch.&lt;/P&gt;
&lt;P&gt;Keep in mind that this here is the&amp;nbsp;&lt;U&gt;SAS&lt;/U&gt; communities, you won't find that much stata expertise here. I've never worked with stata.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 08:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-Stata-from-within-SAS/m-p/874404#M345478</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-08T08:50:34Z</dc:date>
    </item>
  </channel>
</rss>

