BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
JordiGC
Obsidian | Level 7

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 = &macrovar / remote=mySess1;
ERROR: A link must be established by executing the SIGNON command before you can communicate with MYSESS1.
89   %syslput macrovar2 = &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;

This is the example program:

 

%let macrovar = outside;

signon mySess1 sascmd="!sascmd" signonwait=no;
signon mySess2 sascmd="!sascmd" signonwait=no;

%syslput macrovar1 = &macrovar / remote=mySess1;
%syslput macrovar2 = &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_;

Any idea of what the problem might be?

1 ACCEPTED SOLUTION

Accepted Solutions
SASJedi
SAS Super FREQ

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 = &macrovar / remote=mySess1;
%syslput macrovar2 = &macrovar / remote=mySess2;

 

Check out my Jedi SAS Tricks for SAS Users

View solution in original post

1 REPLY 1
SASJedi
SAS Super FREQ

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 = &macrovar / remote=mySess1;
%syslput macrovar2 = &macrovar / remote=mySess2;

 

Check out my Jedi SAS Tricks for SAS Users

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 496 views
  • 3 likes
  • 2 in conversation