<?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: execute sas program using a sas program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69395#M15037</link>
    <description>Interesting number of alternative interpretations of this question!&lt;BR /&gt;
To add to the variety, I had assumed the names of the programs to be executed were in a variable of a metadata table. Then &lt;BR /&gt;
CALL EXECUTE( '%include ' !! Quote( Cats( path, ProgName )) !! " ;" );&lt;BR /&gt;
might do what is needed. &lt;BR /&gt;
 &lt;BR /&gt;
Peter</description>
    <pubDate>Thu, 26 May 2011 13:48:41 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-05-26T13:48:41Z</dc:date>
    <item>
      <title>execute sas program using a sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69392#M15034</link>
      <description>Is there a was to execute a sas program from another sas program.&lt;BR /&gt;
&lt;BR /&gt;
example:&lt;BR /&gt;
retreivedata.sas creates a table from various sources.  &lt;BR /&gt;
 &lt;BR /&gt;
myfile = sas_code\retreivedata.sas&lt;BR /&gt;
&lt;BR /&gt;
data result;&lt;BR /&gt;
set myfile;&lt;BR /&gt;
&lt;BR /&gt;
if cat in ('specialty', 'lines') then cat = 'other';&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 25 May 2011 16:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69392#M15034</guid>
      <dc:creator>mick_g</dc:creator>
      <dc:date>2011-05-25T16:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas program using a sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69393#M15035</link>
      <description>Hello Mick_g,&lt;BR /&gt;
&lt;BR /&gt;
I did not get your point. If your "retreivedata.sas creates a table" then you simply use this name in the following datastep: &lt;BR /&gt;
[pre]&lt;BR /&gt;
data result;&lt;BR /&gt;
  set TableName;&lt;BR /&gt;
  if cat in ('specialty', 'lines') then cat = 'other';&lt;BR /&gt;
run; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Wed, 25 May 2011 17:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69393#M15035</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-05-25T17:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas program using a sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69394#M15036</link>
      <description>With SAS system, you have some options like using a SAS view to generate a file and then reference the file in a subsequent DATA step, for example.&lt;BR /&gt;
&lt;BR /&gt;
Also, if you use the SET statement and supply no specific input, SAS will default to the prior SAS member/file created in the same SAS session.&lt;BR /&gt;
&lt;BR /&gt;
Also, if you wish to specify a SAS file to create and then in a subsequent input using a SET, then consider using a SAS MACRO variable to list the "passed" file name information, where it would be defined with a %LET statement, referenced on a DATA statement using the associated macro variable syntax, and then again later referenced, as needed, again with the macro variable syntax.&lt;BR /&gt;
&lt;BR /&gt;
Otherwise, it's not really clear exactly what you are trying to accomplish and how to recommend an approach, without more specific detailed information.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 25 May 2011 19:48:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69394#M15036</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-05-25T19:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas program using a sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69395#M15037</link>
      <description>Interesting number of alternative interpretations of this question!&lt;BR /&gt;
To add to the variety, I had assumed the names of the programs to be executed were in a variable of a metadata table. Then &lt;BR /&gt;
CALL EXECUTE( '%include ' !! Quote( Cats( path, ProgName )) !! " ;" );&lt;BR /&gt;
might do what is needed. &lt;BR /&gt;
 &lt;BR /&gt;
Peter</description>
      <pubDate>Thu, 26 May 2011 13:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69395#M15037</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-05-26T13:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas program using a sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69396#M15038</link>
      <description>I actually work the problem out a different way.   I have three different programs that rely on the output of the the previous program.&lt;BR /&gt;
so what I was trying to do is have the first programs executed the code from another programs to create a table in current program then send the results to another program for execution   &lt;BR /&gt;
&lt;BR /&gt;
here is how i fixed;   in the first program i had an include statement to get code from another program    in the second program I have an include first program   in the third program  i included code again from another program and include second program and I am now working witht the data.    &lt;BR /&gt;
&lt;BR /&gt;
I think there is an easier way but this works for now so thanks for the help</description>
      <pubDate>Thu, 26 May 2011 16:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69396#M15038</guid>
      <dc:creator>mick_g</dc:creator>
      <dc:date>2011-05-26T16:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: execute sas program using a sas program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69397#M15039</link>
      <description>If it is code used frequently it might be worth making it a macro and placing it in an AUTOCALL library.</description>
      <pubDate>Thu, 26 May 2011 17:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-sas-program-using-a-sas-program/m-p/69397#M15039</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-05-26T17:31:09Z</dc:date>
    </item>
  </channel>
</rss>

