<?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 Pass local macro variables to other sessions in parallel programming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pass-local-macro-variables-to-other-sessions-in-parallel/m-p/885239#M349783</link>
    <description>&lt;P&gt;Hello everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to send a parameter from the main local session to other sessions I am opening to execute in parallel. The program of the example works without the %syslput lines, but as soon as I add these lines I get the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;85   signon mySess1 sascmd="!sascmd" signonwait=no;
NOTE: Background signon to MYSESS1 in progress.
86   signon mySess2 sascmd="!sascmd" signonwait=no;
NOTE: Background signon to MYSESS2 in progress.
87   
88   %syslput macrovar1 = &amp;amp;macrovar / remote=mySess1;
ERROR: A link must be established by executing the SIGNON command before you can communicate with MYSESS1.
89   %syslput macrovar2 = &amp;amp;macrovar / remote=mySess2;
ERROR: A link must be established by executing the SIGNON command before you can communicate with MYSESS2.
90   
91   rsubmit mySess1 wait=no;
92   
93   rsubmit mySess2 wait=no;&lt;/PRE&gt;&lt;P&gt;This is the example program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let macrovar = outside;

signon mySess1 sascmd="!sascmd" signonwait=no;
signon mySess2 sascmd="!sascmd" signonwait=no;

%syslput macrovar1 = &amp;amp;macrovar / remote=mySess1;
%syslput macrovar2 = &amp;amp;macrovar / remote=mySess2;

rsubmit mySess1 wait=no;
	data multitask1;
		x = 1;
	run;
endrsubmit;

rsubmit mySess2 wait=no;
	data multitask2;
		x = 1;
	run;
endrsubmit;

waitfor _all_;
signoff _all_;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any idea of what the problem might be?&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2023 11:14:47 GMT</pubDate>
    <dc:creator>JordiGC</dc:creator>
    <dc:date>2023-07-18T11:14:47Z</dc:date>
    <item>
      <title>Pass local macro variables to other sessions in parallel programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pass-local-macro-variables-to-other-sessions-in-parallel/m-p/885239#M349783</link>
      <description>&lt;P&gt;Hello everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to send a parameter from the main local session to other sessions I am opening to execute in parallel. The program of the example works without the %syslput lines, but as soon as I add these lines I get the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;85   signon mySess1 sascmd="!sascmd" signonwait=no;
NOTE: Background signon to MYSESS1 in progress.
86   signon mySess2 sascmd="!sascmd" signonwait=no;
NOTE: Background signon to MYSESS2 in progress.
87   
88   %syslput macrovar1 = &amp;amp;macrovar / remote=mySess1;
ERROR: A link must be established by executing the SIGNON command before you can communicate with MYSESS1.
89   %syslput macrovar2 = &amp;amp;macrovar / remote=mySess2;
ERROR: A link must be established by executing the SIGNON command before you can communicate with MYSESS2.
90   
91   rsubmit mySess1 wait=no;
92   
93   rsubmit mySess2 wait=no;&lt;/PRE&gt;&lt;P&gt;This is the example program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let macrovar = outside;

signon mySess1 sascmd="!sascmd" signonwait=no;
signon mySess2 sascmd="!sascmd" signonwait=no;

%syslput macrovar1 = &amp;amp;macrovar / remote=mySess1;
%syslput macrovar2 = &amp;amp;macrovar / remote=mySess2;

rsubmit mySess1 wait=no;
	data multitask1;
		x = 1;
	run;
endrsubmit;

rsubmit mySess2 wait=no;
	data multitask2;
		x = 1;
	run;
endrsubmit;

waitfor _all_;
signoff _all_;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any idea of what the problem might be?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 11:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pass-local-macro-variables-to-other-sessions-in-parallel/m-p/885239#M349783</guid>
      <dc:creator>JordiGC</dc:creator>
      <dc:date>2023-07-18T11:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Pass local macro variables to other sessions in parallel programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pass-local-macro-variables-to-other-sessions-in-parallel/m-p/885254#M349789</link>
      <description>&lt;P&gt;At first glance, it looks like you're trying to SYSLPUT the macro variable before the connection has been established to the remote session.&amp;nbsp; Try waiting for the connection to be established before executing SYSLPUT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;signon mySess1 sascmd="!sascmd" signonwait=&lt;STRONG&gt;YES&lt;/STRONG&gt;;
signon mySess2 sascmd="!sascmd" signonwait=&lt;STRONG&gt;YES&lt;/STRONG&gt;;

%syslput macrovar1 = &amp;amp;macrovar / remote=mySess1;
%syslput macrovar2 = &amp;amp;macrovar / remote=mySess2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 13:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pass-local-macro-variables-to-other-sessions-in-parallel/m-p/885254#M349789</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2023-07-18T13:08:07Z</dc:date>
    </item>
  </channel>
</rss>

