<?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 Create a blank SAS program file at execution time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471974#M120945</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Is it possible to create a sas program file (initially without any code)&amp;nbsp; in a given folder (library)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I am not asking about creating a dataset, I need to create a blank sas program file during run time. Like invoking a macro should automatically create a filename.sas program in a folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramakanth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jun 2018 04:47:18 GMT</pubDate>
    <dc:creator>Ramakanthkrovi</dc:creator>
    <dc:date>2018-06-21T04:47:18Z</dc:date>
    <item>
      <title>Create a blank SAS program file at execution time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471974#M120945</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Is it possible to create a sas program file (initially without any code)&amp;nbsp; in a given folder (library)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I am not asking about creating a dataset, I need to create a blank sas program file during run time. Like invoking a macro should automatically create a filename.sas program in a folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramakanth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 04:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471974#M120945</guid>
      <dc:creator>Ramakanthkrovi</dc:creator>
      <dc:date>2018-06-21T04:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank SAS program file at execution time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471975#M120946</link>
      <description>&lt;P&gt;Yes, a SAS program is stored as a text file on disk which you can create in a DATA step. Why do you want to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file pgm "C:\Temp\MySASProgram.sas";
  put "* A Comment;";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 05:21:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471975#M120946</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-06-21T05:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank SAS program file at execution time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471976#M120947</link>
      <description>&lt;P&gt;Can't see any reason to do this, but a data-step can do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   file "PATH_TO_FILE\empty.sas";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 05:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471976#M120947</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-06-21T05:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank SAS program file at execution time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471977#M120948</link>
      <description>&lt;P&gt;One way to go:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  stop;
  file 'c:\temp\test2.sas';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 05:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471977#M120948</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-21T05:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank SAS program file at execution time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471978#M120949</link>
      <description>&lt;P&gt;I just wanted to create a file and write a program using a macro. Sorry if that wasn't clear in the initial question.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 05:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471978#M120949</guid>
      <dc:creator>Ramakanthkrovi</dc:creator>
      <dc:date>2018-06-21T05:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank SAS program file at execution time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471992#M120958</link>
      <description>&lt;P&gt;With macro code you usually don't need to write program code to a separate file, you can just generate the code from within a SAS macro just by calling it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file pgm "C:\Temp\MySASProgram.sas";
  put "* A Comment;";
run;

%include "C:\Temp\MySASProgram.sas";

* Above code does exactly the same thing as the following macro;

%macro comment;

* A Comment;

%mend comment;
%comment;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 07:10:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/471992#M120958</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-06-21T07:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank SAS program file at execution time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/472005#M120967</link>
      <description>&lt;P&gt;You do not even need to write to a file, just use call execute, and no file writing involved.&amp;nbsp; Saved I/O.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 08:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-blank-SAS-program-file-at-execution-time/m-p/472005#M120967</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-21T08:07:15Z</dc:date>
    </item>
  </channel>
</rss>

