<?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: how to exeute one sas prog in another sas prog in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65594#M6586</link>
    <description>I think it's possible to do what your are after. Maybe it's some error in your program logic. To help you with that we need to see your program and detailed log (using options SOURCE2 and MPRINT MLOGIC SYMBOLGEN if you are using some macro functionality).&lt;BR /&gt;
&lt;BR /&gt;
But when you are describing your application, it seems that are trying to accomplish the same functionality that are packaged into 3rd party scheduling software. Maybe you could look for that kind of solution for your task.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
    <pubDate>Thu, 11 Dec 2008 13:38:19 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2008-12-11T13:38:19Z</dc:date>
    <item>
      <title>how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65591#M6583</link>
      <description>i am working in BASE SAS 9.1..i have created one SAS programed Named ABC and now in coding of ABC.sas i want to execute another SAS prog named XYZ .SAS  and i also want to check that XYZ has executed without any error successfully or not. i have to code  all this in ABC.SAS prog.&lt;BR /&gt;
&lt;BR /&gt;
what i have tried?&lt;BR /&gt;
in ABC.SAS to execute XYZ.sas i have used the concept of rsubmit and not successed</description>
      <pubDate>Thu, 11 Dec 2008 04:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65591#M6583</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-11T04:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65592#M6584</link>
      <description>Look up what %include does - and just check return codes from time to time.&lt;BR /&gt;
&lt;BR /&gt;
If you want to execute a program within a data step then you might want to learn about 'call execute'&lt;BR /&gt;
&lt;BR /&gt;
You can always wrap a SAS Base program into a %macro ... %mend and then call the macro later on in your program (just link the objects in EG and have the code with %macro...%mend executed before you call the macros.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick

Message was edited by: Patrick</description>
      <pubDate>Thu, 11 Dec 2008 09:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65592#M6584</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2008-12-11T09:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65593#M6585</link>
      <description>i have tried call execute and %include.&lt;BR /&gt;
i am trying to explain you my task.&lt;BR /&gt;
i have one program ABC.SAS. In which i have to run many sas program like A1,A2,A3....A10.SAS . name all these sas program are in one sas data set.  In the coding of ABC.SAS , i have to execute two and more jobs parallel by using rsubmit concept on server . And i also have to get the execution status like  "executed without any error" for each this job.&lt;BR /&gt;
&lt;BR /&gt;
i used rsubmit concept but it does not take the proper name of sas program submitted to it. whenever i submit the name of any sas program to server from client then it execute the previously submitted sas program e.g. first i submit A1.sas and second execution time i submit A2.sas but server will execute A1.sas.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
please help me...thanks</description>
      <pubDate>Thu, 11 Dec 2008 12:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65593#M6585</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-11T12:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65594#M6586</link>
      <description>I think it's possible to do what your are after. Maybe it's some error in your program logic. To help you with that we need to see your program and detailed log (using options SOURCE2 and MPRINT MLOGIC SYMBOLGEN if you are using some macro functionality).&lt;BR /&gt;
&lt;BR /&gt;
But when you are describing your application, it seems that are trying to accomplish the same functionality that are packaged into 3rd party scheduling software. Maybe you could look for that kind of solution for your task.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Thu, 11 Dec 2008 13:38:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65594#M6586</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-12-11T13:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65595#M6587</link>
      <description>Hi:&lt;BR /&gt;
  Depending on how you're trying to run your jobs "in parallel", it's possible that you may have issues capturing all the return codes. You may be using RSUBMIT, when you should be using a job scheduler, as Linus suggested, or looking at MPCONNECT to perform parallel processing. Given the magnitude of the number of programs that are involved, I recommend that you contact SAS Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 11 Dec 2008 15:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65595#M6587</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-11T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65596#M6588</link>
      <description>Hi actually i am passing name of the sas program on server using macro variable .but this macro variable is processed at compile time. i want it should be resolved at run time . that's why proper information  is not reached at server. every time when i start execution of main sas program then server get the previous value of macro variable  .i am sending you code if u can halp me&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set &lt;SASDATA set="" file="" having="" job_name="" as="" column=""&gt;&lt;BR /&gt;
call symputx('jname','job_name');&lt;BR /&gt;
signon first1;&lt;BR /&gt;
CALL EXECUTE('%syslput rex_path=&amp;amp;EX_PATH;');&lt;BR /&gt;
CALL EXECUTE('%syslput rjname=&amp;amp;JNAME;');	&lt;BR /&gt;
rsubmit first1 sysrputsync=yes notify=no wait=yes   log="D:\ARVIND\AUTOMATE_TESTING\log.log";&lt;BR /&gt;
LIBNAME AmdExStg "D:\ARVIND\AUTOMATE_TESTING\EXTRACTS"; /****THIS LIBRARY CONTAIN THE EXTRACTED TABLES**********/&lt;BR /&gt;
    %include "&amp;amp;REX_PATH\&amp;amp;RJNAME..sas";&lt;BR /&gt;
%sysrput   rt_rc = &amp;amp;trans_rc;&lt;BR /&gt;
%sysrput   rj_rc = &amp;amp;job_rc;&lt;BR /&gt;
endrsubmit;&lt;BR /&gt;
&lt;BR /&gt;
WAITFOR first1;      &lt;BR /&gt;
call execute('%PUT &amp;amp;rt_rc;'); &lt;BR /&gt;
call execute('%PUT &amp;amp;rj_rc;'); &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
in the above code trans_rc and job_rc ..return code which i want on client after execute XYZ.sas program on server. i got the XYZ.SAS  file name from other SAS data set at run time and assign this file name to macro jname.&lt;BR /&gt;
&lt;BR /&gt;
here JNAME is macro varible which get value at run time. actually my problem is here this variable is processed at compile time. but it should get  value at run time . so that  its updated value can be   submitted to server.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
conclusion : in sas wothout using Macro variable and  Macro function ...programming possible ot not?&lt;BR /&gt;
actually we know that Macro always processed at compile time ...this is a big problem....whereas  i want it should be processed at run time....please help me....thanks&lt;/SASDATA&gt;</description>
      <pubDate>Fri, 12 Dec 2008 05:38:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65596#M6588</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-12T05:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65597#M6589</link>
      <description>There are several problems with this code. One major problem is that you are mixing data step, global statements, call execute, macro statements in an unorganized way. The result is that parts of your code will not execute in the intended order.&lt;BR /&gt;
&lt;BR /&gt;
If you want to stick to your basic idea, try to move all of your non data step local statements to a macro, and using call execute with needed parameters.&lt;BR /&gt;
&lt;BR /&gt;
Even if you get this to work, I think like Cynthia that using MP CONNECT would be a neater solution.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Fri, 12 Dec 2008 07:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65597#M6589</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-12-12T07:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65598#M6590</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
It's possible what you try to do - and I've seen it working as well.&lt;BR /&gt;
Do you know this paper? &lt;A href="http://www2.sas.com/proceedings/sugi29/124-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/124-29.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
I agree with Cynthia and Linus that a 3rd party job scheduler would be a better solution. But I also understand that there might be reasons why you can't do it (different department too slow reacting on change requests, no money,....).&lt;BR /&gt;
&lt;BR /&gt;
We're talking about solutions here. But what is the problem? What do you really want to achieve (big picture)? And what's your environment? What's the OS of the server? (i.e. i've seen a neat 'scheduler' written in SAS together with some JCL for z/OS). Which SAS modules are available (i.e. MP Connect?). &lt;BR /&gt;
Do you just need to batch a bunch of sas programs and collect the return codes - or do you also want to implement dependencies between the jobs; and what kind of dependencies?&lt;BR /&gt;
&lt;BR /&gt;
I think before dealing with some coding issues in detail it would be important to get the architecture right. Ask these questions here. I'm sure you'll get some valuable ideas.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Fri, 12 Dec 2008 21:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65598#M6590</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2008-12-12T21:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65599#M6591</link>
      <description>Hi..&lt;BR /&gt;
&lt;BR /&gt;
i have windows xp sp2 as OS and i am working in base SAS 9.1. i have lot of SAS jobs developed by SAS DI STUDIO .&lt;BR /&gt;
Now what i have to do...&lt;BR /&gt;
&lt;BR /&gt;
i am writing a SAS program which will  execute all these SAS DI jobs one by one and also store the result of execution of each job.&lt;BR /&gt;
&lt;BR /&gt;
from performance point of view , i also have to execute all these jobs parallaly in my SAS program.&lt;BR /&gt;
name of all these SAS job are stored in SASdataset file.&lt;BR /&gt;
&lt;BR /&gt;
To complete this task what issues i am facing....&lt;BR /&gt;
1. Macro variable always process at compile time but i want to it should be processed at runtime..becoz i needs its value at run time....at compile time these variable are having null value(default value) .&lt;BR /&gt;
2. in one data step i can't call a macro program having data step.&lt;BR /&gt;
3. at run time how can i call to macro program and it should be executed at run time.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
actually i want to do SAS programming without using concept of macro .&lt;BR /&gt;
it is possible or not ?&lt;BR /&gt;
&lt;BR /&gt;
and how can i write small module function like sub program in "c" lang .&lt;BR /&gt;
and how to run these module and integrate in main program&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
please guide thanks</description>
      <pubDate>Mon, 15 Dec 2008 06:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65599#M6591</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-15T06:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65600#M6592</link>
      <description>If your choice is to solve this via programming, I think that you already got enough tips to get the job done. If your site is using DI Studio, maybe a part of your logic can be addressed within DIS, check on-line doc and Forum papers for inspiration.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Mon, 15 Dec 2008 13:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65600#M6592</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-12-15T13:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65601#M6593</link>
      <description>Hi:&lt;BR /&gt;
  One last thought. If you are using SAS DI Studio to create the jobs, then is it possible that you want/need to use the Platform LSF Scheduler??&lt;BR /&gt;
&lt;BR /&gt;
  Here are some references:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/scalability/platform/lsf6.2_get_started.pdf" target="_blank"&gt;http://support.sas.com/rnd/scalability/platform/lsf6.2_get_started.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/scalability/platform/lsf6.2_ref.pdf" target="_blank"&gt;http://support.sas.com/rnd/scalability/platform/lsf6.2_ref.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
And in the getting started primer, it says that:&lt;B&gt;&lt;BR /&gt;
There are three basic ways to integrate applications with LSF:&lt;BR /&gt;
-- Wrapper shell scripts&lt;BR /&gt;
-- Wrapper binary executables&lt;BR /&gt;
-- Modifying existing application source code and interfaces&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
Just a thought. You might check with Tech Support for help with DI Studio jobs and/or the Platform LSF scheduler.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 15 Dec 2008 22:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65601#M6593</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-15T22:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to exeute one sas prog in another sas prog</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65602#M6594</link>
      <description>A real scheduler would be best, but...&lt;BR /&gt;
&lt;BR /&gt;
Do you know this paper? &lt;A href="http://www2.sas.com/proceedings/sugi27/p105-27.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi27/p105-27.pdf&lt;/A&gt;&lt;BR /&gt;
I think this comes close to what you want. The 'only' open question is how to catch the error-return codes. I found this paper which gives some examples how to do this - but you might find more accurate ones for your requirements with a bit more searching. &lt;A href="http://home.att.net/~gobruen/progs/dos_batch/dos_batch.html" target="_blank"&gt;http://home.att.net/~gobruen/progs/dos_batch/dos_batch.html&lt;/A&gt; &lt;BR /&gt;
&lt;BR /&gt;
May be the Windows Task Scheduler is an option for you: &lt;A href="http://support.sas.com/techsup/technote/ts648/ts648.pdf" target="_blank"&gt;http://support.sas.com/techsup/technote/ts648/ts648.pdf&lt;/A&gt;&lt;BR /&gt;
I believe the task scheduler writes also a log with success/error information.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Wed, 17 Dec 2008 05:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-exeute-one-sas-prog-in-another-sas-prog/m-p/65602#M6594</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2008-12-17T05:56:23Z</dc:date>
    </item>
  </channel>
</rss>

