Hello everyone:
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:
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 = ¯ovar / remote=mySess1; ERROR: A link must be established by executing the SIGNON command before you can communicate with MYSESS1. 89 %syslput macrovar2 = ¯ovar / 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;
This is the example program:
%let macrovar = outside;
signon mySess1 sascmd="!sascmd" signonwait=no;
signon mySess2 sascmd="!sascmd" signonwait=no;
%syslput macrovar1 = ¯ovar / remote=mySess1;
%syslput macrovar2 = ¯ovar / 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_;
Any idea of what the problem might be?
At first glance, it looks like you're trying to SYSLPUT the macro variable before the connection has been established to the remote session. Try waiting for the connection to be established before executing SYSLPUT:
signon mySess1 sascmd="!sascmd" signonwait=YES;
signon mySess2 sascmd="!sascmd" signonwait=YES;
%syslput macrovar1 = ¯ovar / remote=mySess1;
%syslput macrovar2 = ¯ovar / remote=mySess2;
At first glance, it looks like you're trying to SYSLPUT the macro variable before the connection has been established to the remote session. Try waiting for the connection to be established before executing SYSLPUT:
signon mySess1 sascmd="!sascmd" signonwait=YES;
signon mySess2 sascmd="!sascmd" signonwait=YES;
%syslput macrovar1 = ¯ovar / remote=mySess1;
%syslput macrovar2 = ¯ovar / remote=mySess2;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.