<?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: User macros not getting loaded at start up in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124296#M25449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Angela Hall has a nice summary of BI server autoexecs:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A href="http://blogs.sas.com/content/bi/2012/10/29/choosing_an_autoexec/"&gt;http://blogs.sas.com/content/bi/2012/10/29/choosing_an_autoexec/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you want&lt;/P&gt;&lt;P&gt;&amp;nbsp; appserver_autoexec_usermods.sas&lt;/P&gt;&lt;P&gt;?&amp;nbsp; (note 'S' and 'C' are missing from your file name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't done much BI server admin.&amp;nbsp; Typically would think you would want to put this in a config file (defining an autocall library), rather than an autoexec that compiled the macro every time you start a session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jan 2013 17:59:13 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2013-01-14T17:59:13Z</dc:date>
    <item>
      <title>User macros not getting loaded at start up</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124294#M25447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #5f5f5f; font-size: 10pt; font-family: Arial;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;I have a directory set up that contains user macros. I set this directory in my apperver_autoexe_usermods.sas file so it should be initialised at start up. However when I am working in Enterprise Guide I cannot call the marocs as the don't seem to have been loaded. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;If I manually execute a macro I can then use it in my programs so it does not seem to be an issue with the code more a configuration issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything else that I need to set before I can use my macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 11:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124294#M25447</guid>
      <dc:creator>AndrewOS</dc:creator>
      <dc:date>2013-01-14T11:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: User macros not getting loaded at start up</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124295#M25448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That file name appears to be custom to your system; it does not show up on a Google search of SAS.&amp;nbsp; You may need to talk to your local admins. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a workaround, you could include an options statement in your autoexec process flow in EGuide that includes the location in the SASAUTOS parameter (you can probably lift the code directly from apperver_autoexe_usermods.sas).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 15:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124295#M25448</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2013-01-14T15:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: User macros not getting loaded at start up</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124296#M25449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Angela Hall has a nice summary of BI server autoexecs:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A href="http://blogs.sas.com/content/bi/2012/10/29/choosing_an_autoexec/"&gt;http://blogs.sas.com/content/bi/2012/10/29/choosing_an_autoexec/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you want&lt;/P&gt;&lt;P&gt;&amp;nbsp; appserver_autoexec_usermods.sas&lt;/P&gt;&lt;P&gt;?&amp;nbsp; (note 'S' and 'C' are missing from your file name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't done much BI server admin.&amp;nbsp; Typically would think you would want to put this in a config file (defining an autocall library), rather than an autoexec that compiled the macro every time you start a session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 17:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124296#M25449</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-01-14T17:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: User macros not getting loaded at start up</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124297#M25450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what is the code you are using in your autoexec? Are you using the AUTOCALL approach to reading your macros? If so your AUTOEXEC should look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename myautos 'c:\myautos directory';&lt;/P&gt;&lt;P&gt;options sasautos = (myautos, sasautos);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other issue as already discussed is are you modifying the right AUTOEXEC? If you are running a 'standard' BI Server setup then it is the SASApp autoexec_usermods that means to be changed. See the link to Angela's blog above for more details. Also confirm that EG is using SASApp - see in server list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We successfully use this approach ourselves and it works fine for EG, batch jobs, WRS - in fact all SAS jobs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 19:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124297#M25450</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2013-01-14T19:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: User macros not getting loaded at start up</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124298#M25451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #5f5f5f; font-size: 10pt; font-family: Arial;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;BR /&gt; &lt;BR /&gt;I am not using BI. I have a program that is run through a batch process and which I edit in Enterprise Guide. Neither are using my macros. &lt;BR /&gt; &lt;BR /&gt;My E:\SAS\Config\Lev1\SASApp\appserver_autoexec_usermods.sas has the following code. &lt;BR /&gt; &lt;BR /&gt;filename SLmacros "F:\Prod\SASAUTOS";&lt;BR /&gt;options sasautos=( SLmacros, SASMACRO);&lt;BR /&gt; &lt;BR /&gt;And my E:\SAS\Config\Lev1\SASApp\appserver_autoexec.sas&lt;BR /&gt; &lt;BR /&gt;Has &lt;/P&gt;&lt;P&gt;%include "E:\SAS\Config\Lev1\SASApp\appserver_autoexec_usermods.sas";.&lt;BR /&gt; &lt;BR /&gt;I have also tried using the code below within the program itself but this still does not work. &lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;%INCLUDE 'E:\SAS\Config\Lev1\SASApp\appserver_autoexec.sas'; run;&lt;BR /&gt; &lt;BR /&gt;Log entries are below&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;119 %LET mmm = %SetMMYY;&lt;BR /&gt;WARNING: No logical assign for filename SASMACRO.&lt;BR /&gt;WARNING: Source level autocall is not found or cannot be opened. Autocall has been suspended and &lt;BR /&gt;OPTION NOMAUTOSOURCE has been set. To use the autocall facility again, set OPTION &lt;BR /&gt;MAUTOSOURCE.&lt;BR /&gt;WARNING: Apparent invocation of macro SETMMYY not resolved.&lt;BR /&gt;120 %PUT &amp;amp;mmm;&lt;BR /&gt;WARNING: Apparent invocation of macro SETMMYY not resolved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 14:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124298#M25451</guid>
      <dc:creator>AndrewOS</dc:creator>
      <dc:date>2013-01-15T14:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: User macros not getting loaded at start up</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124299#M25452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you describe a little bit more of your setup?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're using EG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you run EG, you could be connecting to a local server (i.e. SAS installed on your PC), or an SAS application server (installed on a unix/linux/windows/etc server).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a unix/linux server, you need to point to the autocall directory using the unix/linux path, not a windows path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like maybe the problem is that you specified a fileref named "SASMACRO", which doesn't exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you are on a Windows server, then I think below should work (note I removed the comma, and changed SASMACRO to sasautos).&lt;/P&gt;&lt;PRE&gt;filename SLmacros "F:\Prod\SASAUTOS";
options sasautos=( SLmacros sasautos);&amp;nbsp; /*removed comma!*/
&lt;/PRE&gt;&lt;P&gt;To check whether the SASAUTOS is set appropriately, you can start a new EG session, and try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put %sysfunc(getoption(sasautos));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And another check would be to try to load the macro by: &lt;/P&gt;&lt;P&gt;&amp;nbsp; %inc "F:\Prod\SASAUTOS\setmmyy.sas" ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that %include won't work, it means SAS is not seeing the file with the macro definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 14:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124299#M25452</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-01-15T14:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: User macros not getting loaded at start up</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124300#M25453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Used your code provided changing SASMACRO to sasautos and it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 15:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-macros-not-getting-loaded-at-start-up/m-p/124300#M25453</guid>
      <dc:creator>AndrewOS</dc:creator>
      <dc:date>2013-01-15T15:01:06Z</dc:date>
    </item>
  </channel>
</rss>

