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;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.