options comamid=netbios remote=netpc;
The OPTIONS statement specifies the COMAMID= and the REMOTE= system options. These two system options define to the local session what type of link you want to establish to which remote host.
libname lhost 'c:\sales\reg1';
This LIBNAME statement defines a libref for the SAS library on the local session where the downloaded data set should be stored.
signon;
The SIGNON statement signs on to the remote host. You don't have to include a remote session ID when you have defined the REMOTE= system option in a previous OPTIONS statement.
rsubmit;
The RSUBMIT statement sends statements to the remote session for processing with the RSUBMIT statement. All statements are sent to the remote session until an ENDRSUBMIT statement is encountered.
Although you don't have to include a remote session ID, using a remote session ID in the RSUBMIT statement clarifies which remote session should process a group of statements when more than one link is active. If you omit the remote session ID, the RSUBMIT statement submits the statements to the remote session that is most recently identified in a SIGNON or an RSUBMIT statement or a REMOTE= system option.
libname rhost 'd:\dept12';
This LIBNAME statement defines the libref for the SAS library on the remote host.
proc download data=rhost.sales
out=lhost.sales;
run;
The PROC DOWNLOAD step transfers the data from the library on the remote host (RHOST) to the library on the local host (LHOST).
endrsubmit;
The ENDRSUBMIT statement signals the end of the block of statements that is to be submitted to the remote session. Statements following the ENDRSUBMIT statement are processed by the local session.
No comments:
Post a Comment