DATA Step, Macro, Functions and more

Passing a value of macro variable to remote sas session with autosignon

Reply
Contributor
Posts: 33

Passing a value of macro variable to remote sas session with autosignon

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
N/A
Posts: 0

Re: Passing a value of macro variable to remote sas session with autosignon

Hi,

I think %sysLput should work:-) but look

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


M. Message was edited by: matej@comma
Contributor
Posts: 33

Re: Passing a value of macro variable to remote sas session with autosignon

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 ?
N/A
Posts: 0

Re: Passing a value of macro variable to remote sas session with autosignon

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;
Contributor
Posts: 33

Re: Passing a value of macro variable to remote sas session with autosignon

Nice work around Matej Smiley Wink Thank a lot for your example Smiley Happy

Regards,
Sarunas
Ask a Question
Discussion stats
  • 4 replies
  • 296 views
  • 0 likes
  • 2 in conversation