<?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 SAS running in MS DOS command prompt in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41472#M10722</link>
    <description>Hi all,&lt;BR /&gt;
              I am new to SAS programming, I have few question reagrding SAS. These questions may be not relevant or easy, but as I said before I have no clue about SAS. So, If any one can help me out it would be great.My questions are:&lt;BR /&gt;
&lt;BR /&gt;
1. Can we run SAS Program from MS DOS command prompt. If yes, how?&lt;BR /&gt;
    I want to run SAS Program in my SSIS Package ( in SQL Server)...the best way i found is through the cmd shell, but I don't know the exact command that need to be used to execute it.&lt;BR /&gt;
2. If we can run the SAS from cmd (MS-DOS)....can we pass parameters to it&lt;BR /&gt;
    My SAS program need some parameters to be sent while executing.....so is there a way to send parameters to my SAS and execute it in CMD (windows)&lt;BR /&gt;
&lt;BR /&gt;
Thank you in advance, I really appreciate your help.&lt;BR /&gt;
&lt;BR /&gt;
Sasi</description>
    <pubDate>Fri, 15 Jan 2010 16:10:17 GMT</pubDate>
    <dc:creator>808854</dc:creator>
    <dc:date>2010-01-15T16:10:17Z</dc:date>
    <item>
      <title>SAS running in MS DOS command prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41472#M10722</link>
      <description>Hi all,&lt;BR /&gt;
              I am new to SAS programming, I have few question reagrding SAS. These questions may be not relevant or easy, but as I said before I have no clue about SAS. So, If any one can help me out it would be great.My questions are:&lt;BR /&gt;
&lt;BR /&gt;
1. Can we run SAS Program from MS DOS command prompt. If yes, how?&lt;BR /&gt;
    I want to run SAS Program in my SSIS Package ( in SQL Server)...the best way i found is through the cmd shell, but I don't know the exact command that need to be used to execute it.&lt;BR /&gt;
2. If we can run the SAS from cmd (MS-DOS)....can we pass parameters to it&lt;BR /&gt;
    My SAS program need some parameters to be sent while executing.....so is there a way to send parameters to my SAS and execute it in CMD (windows)&lt;BR /&gt;
&lt;BR /&gt;
Thank you in advance, I really appreciate your help.&lt;BR /&gt;
&lt;BR /&gt;
Sasi</description>
      <pubDate>Fri, 15 Jan 2010 16:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41472#M10722</guid>
      <dc:creator>808854</dc:creator>
      <dc:date>2010-01-15T16:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS running in MS DOS command prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41473#M10723</link>
      <description>I'm not sure about running from SSIS, but SAS, in general, can be run from the command prompt.  There is a section about it in the SAS Companion for Windows (look at batch execution).&lt;BR /&gt;
&lt;BR /&gt;
I know that passing parameters to a batch SAS program has been discussed in these forums, but can't find it now.  If you have a lot of them to pass, it might be easier to code them as %LET macro variables and store them in a text file to %INCLUDE into the SAS program.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Fri, 15 Jan 2010 16:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41473#M10723</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-01-15T16:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS running in MS DOS command prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41474#M10724</link>
      <description>Yep.&lt;BR /&gt;
&lt;BR /&gt;
Running SAS in batch mode is simple as this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
sas -sysin &lt;YOUR-SCRIPT-HERE&gt; -sysparm '&lt;YOUR-PARAMETERS-HERE&gt;'&lt;BR /&gt;
[/pre]&lt;BR /&gt;
From within your script parameters are accessible through the SYSPARM macro variable.&lt;BR /&gt;
&lt;BR /&gt;
Check the docs here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001283211.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001283211.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/win-sysop-sysin.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/win-sysop-sysin.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/win-sysop-sysparm.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/win-sysop-sysparm.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/YOUR-PARAMETERS-HERE&gt;&lt;/YOUR-SCRIPT-HERE&gt;</description>
      <pubDate>Fri, 15 Jan 2010 16:39:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41474#M10724</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2010-01-15T16:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS running in MS DOS command prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41475#M10725</link>
      <description>The simplest method of passing parameter data is to use the SAS run-time execution parameter SYSPARM=   and you will use either the SAS automatic macro variable &amp;amp;SYSPARM or you can use the SAS function SYSPARM()  to retrieve and parse the (optionally supplied) SYSPARM value as needed for your SAS application program.&lt;BR /&gt;
&lt;BR /&gt;
Another technique is to write your data-strings to a sequential file and then use the SAS DATA step (or other techniques) to input those data for your processing needs.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 15 Jan 2010 16:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41475#M10725</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-15T16:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS running in MS DOS command prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41476#M10726</link>
      <description>Hey Duke,&lt;BR /&gt;
                   Thanx for the reply, It was very helpful to me. I figured out that we can ran SAS through SSIS through the batch job and as you said I will implement the passing parameter passing through the text file. But my concern over here is my parameters are dynamic they vary each time so I though in the batch command it self we can send the parameters, but text file will also work for me as I can overwrite each time the parameters that I'm going to send. Thank you very much.&lt;BR /&gt;
&lt;BR /&gt;
Sasi</description>
      <pubDate>Fri, 15 Jan 2010 16:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41476#M10726</guid>
      <dc:creator>808854</dc:creator>
      <dc:date>2010-01-15T16:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS running in MS DOS command prompt</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41477#M10727</link>
      <description>Hi Daniel and scott,&lt;BR /&gt;
                      Thank you for the reply.I am able to run my SAS Routine through batch mode by passing parameter. Keep it up.U ppl are doing a gr8 job.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Sasi</description>
      <pubDate>Fri, 15 Jan 2010 16:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-running-in-MS-DOS-command-prompt/m-p/41477#M10727</guid>
      <dc:creator>808854</dc:creator>
      <dc:date>2010-01-15T16:59:14Z</dc:date>
    </item>
  </channel>
</rss>

