<?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: open a program everytime SAS lauches in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266702#M52618</link>
    <description>&lt;P&gt;Hi, Loke and&amp;nbsp;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733" target="_self"&gt;&lt;SPAN class="login-bold"&gt;FreelanceReinha&lt;WBR /&gt;rd&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry to confuse you about my description of question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to sas open the &amp;nbsp;macro I told as a memo because I learn that Rsutdio has this function, too.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it is a funcition to remind me and make my write code quicker.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have read the sas auto and the&amp;nbsp;&lt;SPAN&gt; autoexec file.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;however, i failed to do it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you give me the exact code with the example "C:\SASMACRO\WISC4.sas" to help me do it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thx&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2016 13:29:38 GMT</pubDate>
    <dc:creator>ffgsdf</dc:creator>
    <dc:date>2016-04-27T13:29:38Z</dc:date>
    <item>
      <title>open a program everytime SAS lauches</title>
      <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266335#M52482</link>
      <description>&lt;P&gt;If i have a program whose pathway is "C:\SASMACRO\WISC4.sas"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How could I automaticly load it in sas everytime I start to use SAS.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 12:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266335#M52482</guid>
      <dc:creator>ffgsdf</dc:creator>
      <dc:date>2016-04-26T12:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: open a program everytime SAS lauches</title>
      <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266342#M52483</link>
      <description>&lt;P&gt;you include it in the autoexec file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the documentation :&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hostunx/63053/HTML/default/viewer.htm#p13flc1vsrqwr8n1vutzds8rp3t0.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostunx/63053/HTML/default/viewer.htm#p13flc1vsrqwr8n1vutzds8rp3t0.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 12:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266342#M52483</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-04-26T12:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: open a program everytime SAS lauches</title>
      <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266352#M52484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7185"&gt;@ffgsdf﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is not quite clear from your question whether you want to &lt;EM&gt;run&lt;/EM&gt; WISC4.sas or to &lt;EM&gt;open&lt;/EM&gt; it (in the Enhanced Editor).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The good thing is that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33792"&gt;@Loko﻿&lt;/a&gt;'s suggestion works for both purposes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following line in your autoexec.sas (you can name this program differently) will &lt;EM&gt;run&lt;/EM&gt; the program automatically when you launch SAS:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%inc 'C:\SASMACRO\WISC4.sas';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The following line &lt;/SPAN&gt;&lt;SPAN&gt;will &lt;EM&gt;open&lt;/EM&gt; the program automatically in the Enhanced Editor when you launch SAS:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;dm "fileopen 'C:\SASMACRO\WISC4.sas'";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If this is to make a SAS macro available (as your path name suggests), you may also want to read about &lt;A href="http://support.sas.com/documentation/cdl/en/syntaxidx/68719/HTML/default/index.htm#/documentation/cdl//en/mcrolref/67912/HTML/default/p12b2qq72dkxpsn1e19y57emerr6.htm" target="_blank"&gt;autocall libraries&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 13:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266352#M52484</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-04-26T13:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: open a program everytime SAS lauches</title>
      <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266702#M52618</link>
      <description>&lt;P&gt;Hi, Loke and&amp;nbsp;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733" target="_self"&gt;&lt;SPAN class="login-bold"&gt;FreelanceReinha&lt;WBR /&gt;rd&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry to confuse you about my description of question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to sas open the &amp;nbsp;macro I told as a memo because I learn that Rsutdio has this function, too.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it is a funcition to remind me and make my write code quicker.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have read the sas auto and the&amp;nbsp;&lt;SPAN&gt; autoexec file.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;however, i failed to do it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you give me the exact code with the example "C:\SASMACRO\WISC4.sas" to help me do it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thx&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 13:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266702#M52618</guid>
      <dc:creator>ffgsdf</dc:creator>
      <dc:date>2016-04-27T13:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: open a program everytime SAS lauches</title>
      <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266720#M52625</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7185"&gt;@ffgsdf﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to write SAS code more quickly, too, but I'm not familiar with RStudio. So, I'm curious what type of code your program WISC4.sas&amp;nbsp;contains. Is it&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;A)&lt;/STRONG&gt; a long program or SAS macro that you're currently developing or that you need as a sample program (to copy and paste) and which&amp;nbsp;you want to &lt;STRONG&gt;load into the Enhanced Editor&lt;/STRONG&gt; automatically&amp;nbsp;in order to save the repetitive mouse clicks in the "Open Program..." dialog&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;B) &lt;/STRONG&gt;a complete SAS program that you want to &lt;STRONG&gt;execute&lt;/STRONG&gt; automatically, e.g., to set system options, create work datasets, set macro variables or do whatever you would do otherwise manually in your work environment everyday after starting a&amp;nbsp;SAS session&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;C)&lt;/STRONG&gt; a SAS macro (like &lt;FONT face="courier new,courier"&gt;%macro wisc4(...); ...&amp;lt;macro code&amp;gt;... ; %mend wisc4;&lt;/FONT&gt;) which you want to &lt;STRONG&gt;make available&lt;/STRONG&gt; automatically, so that you can call it (like &lt;FONT face="courier new,courier"&gt;%wisc4(...);&lt;/FONT&gt;)?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 27 Apr 2016 14:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266720#M52625</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-04-27T14:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: open a program everytime SAS lauches</title>
      <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266920#M52708</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733" target="_self"&gt;FreelanceReinha&lt;WBR /&gt;rd&lt;/A&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;The function of the program i want to sas open automaticly is some data management.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;like some array syntax, merge syntax, anaylsis syntax.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;I dont wnat to SAS execute them when I open it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Instead, I want to SAS just open it like I ask SAS open a program.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;like the photo i attached.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12491iEB1FA8F910570BF6/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="未命名的圖片.png" title="未命名的圖片.png" /&gt;</description>
      <pubDate>Thu, 28 Apr 2016 09:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266920#M52708</guid>
      <dc:creator>ffgsdf</dc:creator>
      <dc:date>2016-04-28T09:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: open a program everytime SAS lauches</title>
      <link>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266924#M52709</link>
      <description>&lt;P&gt;Thanks for the clarification. So, it's case &lt;STRONG&gt;A&lt;/STRONG&gt; from the list in my previous post. Here are the steps to achieve what you want (assuming a&amp;nbsp;Windows system):&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create&amp;nbsp;a SAS program &lt;STRONG&gt;autoexec.sas&lt;/STRONG&gt; containing the following code:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;dm 'whostedit'; /* opens an Enhanced Editor window (optional) */
dm 'fileopen "C:\SASMACRO\WISC4.sas"'; /* opens your program */
dm 'wpgm' continue; /* switches the focus back to the empty Enhanced Editor window (optional) */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Save it to&amp;nbsp;the folder where sas.exe resides (typically C:\Program Files\SASHome\SASFoundation\9.4, but please check).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Additional information:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;SAS searches several locations for autoexec.sas files: please see section "The Default Autoexec File" in &lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/67962/HTML/default/viewer.htm#p0bmj7wjme32ayn1h4wim7trkhp6.htm#p0ceb6r7y2mkdsn1lc2ice1mx1dc" target="_blank"&gt;Files Used by SAS&lt;/A&gt;. So, the above assumes that SAS doesn't find another autoexec.sas in a location with higher priority.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On my workstation I use an autoexec file with a different name and in a different location, which is specified in the -AUTOEXEC system option that I apply when launching SAS. I can give you further instructions if you want to go this route instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 10:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/open-a-program-everytime-SAS-lauches/m-p/266924#M52709</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-04-28T10:45:33Z</dc:date>
    </item>
  </channel>
</rss>

