<?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: Interrupt a parallel session in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Interrupt-a-parallel-session/m-p/988461#M380123</link>
    <description>&lt;P&gt;From the docs, looks like KILLTASK is just what you're looking for:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/p06892khfraoocn1kmcxw9e66ztz.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/p06892khfraoocn1kmcxw9e66ztz.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The KILLTASK statement enables users to terminate one or more tasks or server sessions that are executing&amp;nbsp; asynchronously. The KILLTASK statement is useful only for an asynchronous RSUBMIT.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Success might vary a bit depending on IDE and OS.&amp;nbsp; Did you give it a try?&lt;/P&gt;</description>
    <pubDate>Thu, 21 May 2026 13:15:35 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2026-05-21T13:15:35Z</dc:date>
    <item>
      <title>Interrupt a parallel session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interrupt-a-parallel-session/m-p/988429#M380122</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm trying to understand the behavior of parallel sessions (I'm using a SAS Enterprise Guide). &lt;BR /&gt;In my example I'm using SIGNON and RSUBMIT WAIT=NO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my test:&lt;BR /&gt;- the main session creates a few files (server_first, server_mid, server_last);&lt;BR /&gt;- in parallel, a remote session is started which progressively creates the remote_i files with a 5-second pause between each iteration (sleep function).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option sascmd="sas";
 
%let save_path = path1\path2\path3;
data "&amp;amp;save_path\server_first"; &lt;BR /&gt;   var=1; 
run;
 
signon task1;
rsubmit task1 wait=no;
	%let save_path = path1\path2\path3;

	%macro create_table;

		%do i=1 %to 10;
			data "&amp;amp;save_path\remote_&amp;amp;i"; 
				a=&amp;amp;i; 
			run;

			%let sleep_var = %sysfunc(sleep(5));

		%end;
	%mend;
	%create_table;

endrsubmit;
 
data "&amp;amp;save_path\server_mid"; 
   var=1; 
run;
 
waitfor _all_;
signoff _all_;
 
data "&amp;amp;save_path\server_last"; 
   var=1; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;During execution, after the creation of remote_2, I stopped the run from SAS Enterprise Guide. From what I observed:&lt;BR /&gt;- the main session is effectively interrupted (for example, server_last is not created);&lt;/P&gt;
&lt;P&gt;- the remote session keeps running independently and completes the creation of all the remote_i files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;So, it seems that the remote session remains independent from the main one. Is it correct?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I would like to ask if there is a way to interrupt the remote sessions even after the main session has been interrupted. I know there are commands such as &lt;STRONG&gt;KILLTASK&lt;/STRONG&gt; and &lt;STRONG&gt;LISTTASK&lt;/STRONG&gt;, but I'm not sure whether they are relevant in this case.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2026 10:20:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interrupt-a-parallel-session/m-p/988429#M380122</guid>
      <dc:creator>Gauss212</dc:creator>
      <dc:date>2026-05-21T10:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt a parallel session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interrupt-a-parallel-session/m-p/988461#M380123</link>
      <description>&lt;P&gt;From the docs, looks like KILLTASK is just what you're looking for:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/p06892khfraoocn1kmcxw9e66ztz.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/p06892khfraoocn1kmcxw9e66ztz.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The KILLTASK statement enables users to terminate one or more tasks or server sessions that are executing&amp;nbsp; asynchronously. The KILLTASK statement is useful only for an asynchronous RSUBMIT.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Success might vary a bit depending on IDE and OS.&amp;nbsp; Did you give it a try?&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2026 13:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interrupt-a-parallel-session/m-p/988461#M380123</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2026-05-21T13:15:35Z</dc:date>
    </item>
  </channel>
</rss>

