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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 2751 views
  • 0 likes
  • 2 in conversation