<?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: Calling SAS code from another SAS program including passing variables? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477079#M71263</link>
    <description>&lt;P&gt;And what about those 4 statements should be parameterized?&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jul 2018 13:53:34 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-07-11T13:53:34Z</dc:date>
    <item>
      <title>Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477066#M71260</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using SAS 9.4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a program called "regroup" that indicates the location of two sets of text documents plus an export file name as %let export_file:&lt;/P&gt;
&lt;PRE&gt;Libname mylib 'C:\SAS Datasets';
filename M_regrp('C:\text data\monthly\.*txt';
filename Y_regrp('C:\text data\yearly\*.txt';
%let export_file="C:\sas_data.mdb";
&lt;/PRE&gt;
&lt;P&gt;I wish to call the regroup from another program and pass the 4 settings above from the other program.&amp;nbsp; How do I do that?&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 13:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477066#M71260</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2018-07-11T13:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477075#M71261</link>
      <description>&lt;P&gt;Why would you handle something simple as that in an external include? It only obfuscates your code and makes life a misery for your future self.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 13:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477075#M71261</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-11T13:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477078#M71262</link>
      <description>&lt;P&gt;The report in question (regrp) is actually used for many hospitals and I have them all in the code and just comment out the sites I don't want at the time I run it.&amp;nbsp; So rather than have multiple copies of regrp to call for each site from this other program, I thought it would be easier to call it from another program that I have to run that uses the resulting dataset from the regrp program.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 13:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477078#M71262</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2018-07-11T13:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477079#M71263</link>
      <description>&lt;P&gt;And what about those 4 statements should be parameterized?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 13:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477079#M71263</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-11T13:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477083#M71264</link>
      <description>&lt;P&gt;Not sure I know what you're asking but each hospital with have a different location for the file location of M_regrp and Y_regrp as well as different locations for the library name and the export_file.&amp;nbsp; So I want to pass those to the report via the other report that calls the program.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 13:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477083#M71264</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2018-07-11T13:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477099#M71267</link>
      <description>&lt;P&gt;Define what the "settings" are in this sentence from your first post:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wish to call the regroup from another program and pass the 4 settings above from the other program.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 14:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477099#M71267</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-11T14:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477103#M71268</link>
      <description>The other program imports data from two locations and merges them, exports to a database and is saved to a specific library.  &lt;BR /&gt;&lt;BR /&gt;So I assume I would use %include to indicate the program I want to run, but I want to know how to identify the location of M_regrp and Y_regrp files, the library name to save the dataset to and the database to export the table to.  Those are the settings being passed to the called report.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jul 2018 14:28:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477103#M71268</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2018-07-11T14:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477124#M71271</link>
      <description>&lt;P&gt;So you would do something like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let libpath=C:\SAS Datasets;

%include 'c:\.......\regroup.sas';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and regroup.sas would be&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib "&amp;amp;libpath.";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jul 2018 15:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477124#M71271</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-11T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477132#M71272</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wasn't sure about what you were advising but I found that all I needed to do was to copy the filename, libname and let statement for the database to above the %include line and it runs as it should.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 15:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477132#M71272</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2018-07-11T15:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calling SAS code from another SAS program including passing variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477489#M71300</link>
      <description>&lt;P&gt;If you have SAS/IML, you could try CALL EXECUTEFILE() .&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 14:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calling-SAS-code-from-another-SAS-program-including-passing/m-p/477489#M71300</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-12T14:10:58Z</dc:date>
    </item>
  </channel>
</rss>

