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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 2944 views
  • 0 likes
  • 2 in conversation