BookmarkSubscribeRSS Feed
sarunas
Calcite | Level 5
Dear SAS experts,
I don't know how to pass a value of macro variable to remote asynchronous sas session that was started with RSUBMIT statement with AUTOSIGNON option. With that option I can not exploit %SYSLPUT statement.

Below is an example:

%macro test;

option autosignon=yes;
option sascmd="!sascmd";

%let path = /disk1/folder1;

rsubmit process=ps1 cwait=no;
%include "&path";
endrsubmit;

%mend test;

Could you please help me to find out how could I pass the value of &path to remote sas session.

Thanks in advance
4 REPLIES 4
deleted_user
Not applicable
Hi,

I think %sysLput should work:-) but look

http://support.sas.com/kb/6/883.html


M. Message was edited by: matej@comma
sarunas
Calcite | Level 5
Thanks Matej for your help. I have not seen this information before, but I have experienced it...

Is it something like a gap in interface between sas macro and MP/connect, that there is no way to pass a value of macro variable from client to server sas sessions ?
deleted_user
Not applicable
You should try something like this. I suppose, that it will work with AUTOSIGNON and CWAIT = NO option too.


%macro test;
%let PATH=/disk1/folder1fsdfsdf;

data LOCAL_MACROS;
length PATH $2000;
PATH = "&path";
run;

rsubmit;
proc upload data = LOCAL_MACROS OUT = SERVER_MACROS;
run;

data _null_;
set SERVER_MACROS;
call symPut("S_PATH", PATH);
run;
endrsubmit;
%mend;
%test;

rsubmit;
%put &S_PATH;
endrsubmit;
sarunas
Calcite | Level 5
Nice work around Matej 😉 Thank a lot for your example 🙂

Regards,
Sarunas

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 3815 views
  • 0 likes
  • 2 in conversation