ravi teja pandilla
ravi teja pandilla

Reputation: 67

Can SAS macro variables created in remote session be used in local program submission

Could any one help me in providing any solution to my issue explained below?

I am running some part of the code in SAS which is submitted in remote server. and then I have to export the the created dataset to excel. so i wrote a export code outside remote submission, but it is not able to use the parameters defined in remote session.

Please provide any work around for this issue.

Thanks in advance.

Upvotes: 0

Views: 403

Answers (1)

Allan Bowe
Allan Bowe

Reputation: 12691

Pass your parameters back to the local session as follows:

rsubmit;
  %put NOTE: running remotely;
  %let myvar=&syscp;
  %sysrput localvar=&myvar;
endrsubmit;

%put &=localvar;

Remember that your excel export process will need to read your remote data so be sure to use the right library (eg RWORK).

Upvotes: 1

Related Questions