<?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 storage of macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/storage-of-macro/m-p/7724#M130</link>
    <description>How to store macro and how to call the macro?</description>
    <pubDate>Thu, 27 Mar 2008 11:17:47 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-03-27T11:17:47Z</dc:date>
    <item>
      <title>storage of macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/storage-of-macro/m-p/7724#M130</link>
      <description>How to store macro and how to call the macro?</description>
      <pubDate>Thu, 27 Mar 2008 11:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/storage-of-macro/m-p/7724#M130</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-03-27T11:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: storage of macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/storage-of-macro/m-p/7725#M131</link>
      <description>From SAS documentation:&lt;BR /&gt;
&lt;BR /&gt;
MAUTOSOURCE System Option&lt;BR /&gt;
&lt;BR /&gt;
--------------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
Controls whether the autocall feature is available Type: System option  &lt;BR /&gt;
Valid in: Configuration file&lt;BR /&gt;
 &lt;BR /&gt;
OPTIONS window&lt;BR /&gt;
OPTIONS statement&lt;BR /&gt;
SAS invocation&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
Default: MAUTOSOURCE  &lt;BR /&gt;
PROC OPTIONS GROUP=  MACRO  &lt;BR /&gt;
&lt;BR /&gt;
MAUTOSOURCE | NOMAUTOSOURCE  &lt;BR /&gt;
&lt;BR /&gt;
MAUTOSOURCE &lt;BR /&gt;
causes the macro processor to search the autocall libraries for a member with the requested name when a macro name is not found in the WORK library.&lt;BR /&gt;
&lt;BR /&gt;
===========================================================&lt;BR /&gt;
&lt;BR /&gt;
SASAUTOS= System Option&lt;BR /&gt;
&lt;BR /&gt;
--------------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
Specifies one or more autocall libraries Type: System option  &lt;BR /&gt;
Valid in: Configuration file&lt;BR /&gt;
 &lt;BR /&gt;
OPTIONS window&lt;BR /&gt;
OPTIONS statement&lt;BR /&gt;
SAS invocation&lt;BR /&gt;
 &lt;BR /&gt;
PROC OPTIONS GROUP=  ENVFILES  &lt;BR /&gt;
 MACRO  &lt;BR /&gt;
&lt;BR /&gt;
SASAUTOS= library-specification | &lt;BR /&gt;
(library-specification-1 . . . , library-specification-n) &lt;BR /&gt;
&lt;BR /&gt;
Details &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
When SAS searches for an autocall macro definition, it opens and searches each location in the same order that it is specified in the SASAUTOS option. If SAS cannot open any specified location, it generates a warning message and sets the NOMAUTOSOURCE system option on. To use the autocall facility again in the same SAS session, you must specify the MAUTOSOURCE option again.&lt;BR /&gt;
&lt;BR /&gt;
===========================================================&lt;BR /&gt;
&lt;BR /&gt;
We created a directory which we call "MACLIB".&lt;BR /&gt;
The directory exists in Prod, Test and Dev -- .../Prod/MacLib, .../Test/MacLib, .../Dev/MacLib.&lt;BR /&gt;
We have a standard library that we define:&lt;BR /&gt;
  Libname maclib (".../&amp;amp;environment/MacLib", ".../Prod/MacLIb") ;&lt;BR /&gt;
We then define the options:&lt;BR /&gt;
  options MAUTOSOURCE SASAUTOS=(MacLib, SASAUTOS);&lt;BR /&gt;
&lt;BR /&gt;
"&amp;amp;environment" is set earlier by a macro that recognizes where the source code is being executed from so that it can set the runtime environment:  Prod, Test or Dev.&lt;BR /&gt;
This method allows for change control, and means you don't have to have a complete copy of production in the development and test environments.&lt;BR /&gt;
&lt;BR /&gt;
Read about concatenated Libraries in the SAS documentation.</description>
      <pubDate>Thu, 27 Mar 2008 12:05:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/storage-of-macro/m-p/7725#M131</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-03-27T12:05:49Z</dc:date>
    </item>
  </channel>
</rss>

