<?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 execute more sas codes automatically and orderly in Unix in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518737#M140429</link>
    <description>Hi Jagadishkatam, I tried it. However the codes like qc_SDTM_ex.sas don't execute in the UNIX and there are no erorrs/warrings.</description>
    <pubDate>Wed, 05 Dec 2018 11:16:53 GMT</pubDate>
    <dc:creator>Guofeng</dc:creator>
    <dc:date>2018-12-05T11:16:53Z</dc:date>
    <item>
      <title>How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518721#M140420</link>
      <description>&lt;P&gt;I'd like to execute more&amp;nbsp;SAS codes automatically and orderly.&lt;/P&gt;&lt;P&gt;Follow code(all_codes.sas) can run successfully in Window SAS. However it failed in Unix when I used command: sas94 all_codes.sas in Putty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro all_codes;&lt;BR /&gt;&amp;nbsp;data _null_;&lt;BR /&gt;&amp;nbsp;systask command "sas &amp;amp;QCPROG.qc_SDTM_ex.sas" taskname="ex" ;&lt;BR /&gt;&amp;nbsp;systask command "sas &amp;amp;QCPROG.qc_SDTM_ec.sas" taskname="ec" ;&lt;BR /&gt;&amp;nbsp;systask command "sas &amp;amp;QCPROG.qc_SDTM_ds.sas" taskname="ds" ;&lt;BR /&gt;&amp;nbsp;waitfor _all_ ex ec ds ;&lt;BR /&gt;&amp;nbsp;run;&lt;BR /&gt;&amp;nbsp;%mend deal_codes;&lt;BR /&gt;&amp;nbsp;%deal_codes;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anybody do me a favor? Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 10:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518721#M140420</guid>
      <dc:creator>Guofeng</dc:creator>
      <dc:date>2018-12-05T10:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518729#M140423</link>
      <description>&lt;P&gt;Could try the x command as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro all_codes;
 data _null_;
 x "sas &amp;amp;QCPROG.all_codes.sas" ;
 x "sas &amp;amp;QCPROG.qc_SDTM_ex.sas";
 x "sas &amp;amp;QCPROG.qc_SDTM_ec.sas" ;
 x "sas &amp;amp;QCPROG.qc_SDTM_ds.sas" ;
 run;
 %mend deal_codes;
 %deal_codes;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Dec 2018 10:53:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518729#M140423</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-12-05T10:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518733#M140427</link>
      <description>&lt;P&gt;A couple of questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can you start SAS using "&lt;SPAN&gt;sas94 all_codes.sas&lt;/SPAN&gt;" from the Shell?&lt;/LI&gt;&lt;LI&gt;Why do you put your SYSTASK statements after DATA _NULL_? This is not a data step statement, you can use it anywhere.&lt;/LI&gt;&lt;LI&gt;Can you start your SAS command using an X statement or command? Try that, with OPTIONS XWAIT, then you should be able to see what happens in the Shell window.&lt;/LI&gt;&lt;LI&gt;In what way does the SYSTASK command fail? Any messages in the log?&lt;/LI&gt;&lt;LI&gt;Can you start a SAS using SYSTASK outside the SAS system?&lt;/LI&gt;&lt;LI&gt;What does it mean that you use the command in Putty? that's not a Shell (or is it?), I think it's a file transfer program.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 11:02:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518733#M140427</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-12-05T11:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518735#M140428</link>
      <description>PuTTY is an SSH and Telnet client for Windows， it can check in/out data in Unix and also can use sas9 xxx.sas to run sas codes.</description>
      <pubDate>Wed, 05 Dec 2018 11:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518735#M140428</guid>
      <dc:creator>Guofeng</dc:creator>
      <dc:date>2018-12-05T11:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518737#M140429</link>
      <description>Hi Jagadishkatam, I tried it. However the codes like qc_SDTM_ex.sas don't execute in the UNIX and there are no erorrs/warrings.</description>
      <pubDate>Wed, 05 Dec 2018 11:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518737#M140429</guid>
      <dc:creator>Guofeng</dc:creator>
      <dc:date>2018-12-05T11:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518744#M140435</link>
      <description>Hi s_lassen, thank you so much for the valuable comments. for comments #3 and #5,could you show me some examples when you have time. I'm not familiar with SYSTASK and command. I often run SAS codes in SAS system.&lt;BR /&gt;Sincere appreciation.</description>
      <pubDate>Wed, 05 Dec 2018 11:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518744#M140435</guid>
      <dc:creator>Guofeng</dc:creator>
      <dc:date>2018-12-05T11:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518754#M140438</link>
      <description>&lt;P&gt;Start by catching all system responses to a command:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "sas &amp;amp;QCPROG.qc_SDTM_ex.sas 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Look at the log and see what you got.&lt;/P&gt;
&lt;P&gt;Once you know what really happens, we can devise ways to work around your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the filename pipe is the best method to run external commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note that systask and waitfor are global statements and do not need a data step to run.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 12:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518754#M140438</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-05T12:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute more sas codes automatically and orderly in Unix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518807#M140455</link>
      <description>&lt;P&gt;Re my comment #3: If you are running in a Windows terminal, you may not be able to start a session in another window, using the X command. Try instead the pipe approach suggested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Re #5: Sorry, I did not mean to try and start a SYSTASK outside the SAS System. It should have been outside the macro. It is often easier to make Things work if you try first without the macro calls.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 14:35:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-more-sas-codes-automatically-and-orderly-in-Unix/m-p/518807#M140455</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-12-05T14:35:19Z</dc:date>
    </item>
  </channel>
</rss>

