<?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 use SYSTASK? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-SYSTASK/m-p/67551#M14627</link>
    <description>This is a common problem solved with %UNQUOTE.&lt;BR /&gt;
&lt;BR /&gt;
systask command %unquote(%str(%')&amp;amp;BatchIt%str(%'));</description>
    <pubDate>Fri, 02 Jan 2009 12:06:43 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2009-01-02T12:06:43Z</dc:date>
    <item>
      <title>How to use SYSTASK?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-SYSTASK/m-p/67550#M14626</link>
      <description>Hi all&lt;BR /&gt;
Can one of you tell me how to use "systask" in the code below.&lt;BR /&gt;
I just can't figure it out!&lt;BR /&gt;
Cheers, Patrick &lt;BR /&gt;
&lt;BR /&gt;
proc format; &lt;BR /&gt;
  picture datestamp (default=19) &lt;BR /&gt;
      other='%Y%0m%0d_%0H%0M%0S' (datatype=datetime) &lt;BR /&gt;
  ; &lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
%global SASexe SASconfig SASautoexec SASsysin SASlog SASprint;&lt;BR /&gt;
%let timestamp=%sysfunc(datetime(),datestamp.);&lt;BR /&gt;
&lt;BR /&gt;
%let job=job1;&lt;BR /&gt;
&lt;BR /&gt;
%let SASexe    = "c:\Program Files\SAS\SASFoundation\9.2\sas.exe";&lt;BR /&gt;
%let SASsysin  = -sysin "C:\Documents and Settings\ssapam\My Documents\My SAS Files\9.2\&amp;amp;job..sas";&lt;BR /&gt;
%let SASlog    = -log "c:\test\&amp;amp;job&amp;amp;timestamp..log";&lt;BR /&gt;
%let SASprint  = -print "c:\test\&amp;amp;job&amp;amp;timestamp..lst";&lt;BR /&gt;
&lt;BR /&gt;
%let BatchIt=&amp;amp;SASexe &amp;amp;SASconfig &amp;amp;SASautoexec &amp;amp;SASsysin &amp;amp;SASlog &amp;amp;SASprint -nosplash -icon;&lt;BR /&gt;
&lt;BR /&gt;
%macro test;&lt;BR /&gt;
/* working */&lt;BR /&gt;
  %sysexec &amp;amp;BatchIt;&lt;BR /&gt;
&lt;BR /&gt;
/*  NOT working */&lt;BR /&gt;
/*   systask command &amp;amp;BatchIt;*/&lt;BR /&gt;
&lt;BR /&gt;
/* NOT working */&lt;BR /&gt;
/*   systask command %str(%')&amp;amp;BatchIt%str(%');*/&lt;BR /&gt;
%mend; &lt;BR /&gt;
%test</description>
      <pubDate>Fri, 02 Jan 2009 03:03:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-SYSTASK/m-p/67550#M14626</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-01-02T03:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to use SYSTASK?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-SYSTASK/m-p/67551#M14627</link>
      <description>This is a common problem solved with %UNQUOTE.&lt;BR /&gt;
&lt;BR /&gt;
systask command %unquote(%str(%')&amp;amp;BatchIt%str(%'));</description>
      <pubDate>Fri, 02 Jan 2009 12:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-SYSTASK/m-p/67551#M14627</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-01-02T12:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use SYSTASK?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-SYSTASK/m-p/67552#M14628</link>
      <description>That worked. Thanks data _null_ !&lt;BR /&gt;
Do you also have an explanation why this %unquote is needed? I don't get it.&lt;BR /&gt;
Cheers, Patrick&lt;BR /&gt;
&lt;BR /&gt;
.... Think I got it! And I thought always that %' means "masking" the following character for macro resolution. I was never aware that this is a "quoting". Learnt something &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: Patrick</description>
      <pubDate>Fri, 02 Jan 2009 12:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-SYSTASK/m-p/67552#M14628</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-01-02T12:34:22Z</dc:date>
    </item>
  </channel>
</rss>

