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

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 2024

Innovate_SAS_Blue.png

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. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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