<?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 How to assign list of SAS/CONNECT tasks to dataset/array/collection? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-list-of-SAS-CONNECT-tasks-to-dataset-array/m-p/336608#M76323</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Base SAS 9.4]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using a macro to create and sign-on to some asynchronous tasks with dynamic names. Here's snippet from the macro to illustrate:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%DO i = 1 %TO &amp;amp;num_tasks;

    %GLOBAL task&amp;amp;i;
    %LET task&amp;amp;i = &amp;amp;some_value;
    SIGNON task&amp;amp;i;&lt;BR /&gt;
%END;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to create one or more additional macros that do some additional processing on any tasks that have been created, but I'm unsure how to obtain a list of the task names. I'm using&amp;nbsp;&lt;STRONG&gt;&amp;amp;num_tasks&lt;/STRONG&gt; as a parameter in the macro above,&amp;nbsp;but I'd prefer to obtain a list of the task names because I'm considering adding an environment/server parameter to the macro above and adding a letter before&amp;nbsp;&lt;STRONG&gt;task&amp;amp;i&lt;/STRONG&gt;, such as &lt;STRONG&gt;pTask&amp;amp;i&lt;/STRONG&gt;, to indicate where the task should be running (and not overwrite existing tasks if the macro was run to create tasks for another environment).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I can use&amp;nbsp;&lt;STRONG&gt;LISTTASK _ALL_&lt;/STRONG&gt; to put the list of tasks, with statuses, to my log file, but I'd like to assign the list to some kind of&amp;nbsp;collection, like a dataset or an array, that I can use in my code.&amp;nbsp;Are the list of tasks stored in a&amp;nbsp;SASHELP table/view (i looked all through SASHELP with no luck) or some other way to obtain the tasks?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 15:54:37 GMT</pubDate>
    <dc:creator>beacon</dc:creator>
    <dc:date>2017-02-28T15:54:37Z</dc:date>
    <item>
      <title>How to assign list of SAS/CONNECT tasks to dataset/array/collection?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-list-of-SAS-CONNECT-tasks-to-dataset-array/m-p/336608#M76323</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Base SAS 9.4]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using a macro to create and sign-on to some asynchronous tasks with dynamic names. Here's snippet from the macro to illustrate:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%DO i = 1 %TO &amp;amp;num_tasks;

    %GLOBAL task&amp;amp;i;
    %LET task&amp;amp;i = &amp;amp;some_value;
    SIGNON task&amp;amp;i;&lt;BR /&gt;
%END;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to create one or more additional macros that do some additional processing on any tasks that have been created, but I'm unsure how to obtain a list of the task names. I'm using&amp;nbsp;&lt;STRONG&gt;&amp;amp;num_tasks&lt;/STRONG&gt; as a parameter in the macro above,&amp;nbsp;but I'd prefer to obtain a list of the task names because I'm considering adding an environment/server parameter to the macro above and adding a letter before&amp;nbsp;&lt;STRONG&gt;task&amp;amp;i&lt;/STRONG&gt;, such as &lt;STRONG&gt;pTask&amp;amp;i&lt;/STRONG&gt;, to indicate where the task should be running (and not overwrite existing tasks if the macro was run to create tasks for another environment).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I can use&amp;nbsp;&lt;STRONG&gt;LISTTASK _ALL_&lt;/STRONG&gt; to put the list of tasks, with statuses, to my log file, but I'd like to assign the list to some kind of&amp;nbsp;collection, like a dataset or an array, that I can use in my code.&amp;nbsp;Are the list of tasks stored in a&amp;nbsp;SASHELP table/view (i looked all through SASHELP with no luck) or some other way to obtain the tasks?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 15:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-list-of-SAS-CONNECT-tasks-to-dataset-array/m-p/336608#M76323</guid>
      <dc:creator>beacon</dc:creator>
      <dc:date>2017-02-28T15:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign list of SAS/CONNECT tasks to dataset/array/collection?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-list-of-SAS-CONNECT-tasks-to-dataset-array/m-p/337299#M76583</link>
      <description>&lt;P&gt;Set up a temp data set with the desired data elements at the beginning of your proces...then just query it prior to running your macro. You can easily pull &amp;amp;num_tasks with a sql query :into a macro variable...and presumably any other data elements for further processing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 10:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-list-of-SAS-CONNECT-tasks-to-dataset-array/m-p/337299#M76583</guid>
      <dc:creator>Jay_TxOAG</dc:creator>
      <dc:date>2017-03-02T10:54:52Z</dc:date>
    </item>
  </channel>
</rss>

