DATA Step, Macro, Functions and more

Assign a dataset to a lobal dataset via remote submit

Accepted Solution Solved
Reply
Contributor
Posts: 48
Accepted Solution

Assign a dataset to a lobal dataset via remote submit

[ Edited ]

Hello everyone,

 

I would like to store dataset  in a remote subit session to a global dataset.

How could I do that?

 

example:

 

%global  data global_dataset;

 

*assume all connection to another host is successed;

rsubmit;

* assume i get a dataset b  from the host database;

 

*this is what I have tried;

data a;

    set b;

run;

 

ENDRSUBMIT:
SIGNOFF;

 

proc print a; 

*a gets no rows

 

 

 

Anyone can help?


Accepted Solutions
Solution
‎07-30-2017 11:49 PM
Super User
Posts: 7,832

Re: Assign a dataset to a lobal dataset via remote submit

To copy a dataset from the remote to the local session in a SAS/CONNECT context, use proc download.

This:

%global  data global_dataset;

will only put the macro variables &data and &global_dataset into the global symbol table.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
‎07-30-2017 11:49 PM
Super User
Posts: 7,832

Re: Assign a dataset to a lobal dataset via remote submit

To copy a dataset from the remote to the local session in a SAS/CONNECT context, use proc download.

This:

%global  data global_dataset;

will only put the macro variables &data and &global_dataset into the global symbol table.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 48

Re: Assign a dataset to a lobal dataset via remote submit

[ Edited ]
Posted in reply to KurtBremser

it succeeds to get data after editing to 

proc download data=b out=a;

run;

 

 

However, after running the sas code in Unix, a message is occured:

No registered SAS sessions match target info

Super User
Posts: 7,832

Re: Assign a dataset to a lobal dataset via remote submit

What do you mean by:



after running the sas code in Unix

?

 

Please provide context, code and log.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 48

Re: Assign a dataset to a lobal dataset via remote submit

Posted in reply to KurtBremser

/unix_location> sas myProgram.sas
/unix_location> No registered SAS sessions match target info

Super Contributor
Posts: 440

Re: Assign a dataset to a lobal dataset via remote submit

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 143 views
  • 1 like
  • 3 in conversation