Doing More with Remote Connect |
The "Using Remote Connect" chapter of Getting Started with SAS/ASSIST showed you how to use task window selections in a local SAS/ASSIST session and run the task on a remote host using remote data. However, that process works only if you have a copy of the remote table on the local host because you need information about the table stored locally in order to make task window selections. If the table you wish to use is very large, it may not be practical to download a copy to your local host.
The process described in this section addresses this problem. Using this process, you can download information about the table (such as column names, types, and formats), without downloading any data, so that you can make task window selections. Alternatively, you can download a small portion of the data (a few rows or a subset based on a WHERE clause) to test the task. Then you can run the task on the remote host using Remote submit on the Run menu.
Instructions |
Use the Tasks menu to access the desired SAS/ASSIST task window.
Instead of using the Table button to select a table, follow this selection path:Run Select Remote DataThe Get Remote Data window appears.
Select Table. A list of tables on the remote host appears.
Select Remote Table Window
This list includes all tables on all libraries which are assigned on startup of the remote SAS session. If a particular library you are looking for does not appear, the library is not assigned in the remote SAS session. To assign a libref on a remote host, follow the instructions in Assigning Librefs on Remote SAS Sessions, then begin this procedure again from step 1.Note: If you have more than one remote connection open, the Remote Data window displays only the libraries from the connection most recently established. If you want to select data from a different remote host, terminate and then re-establish a connection with the desired remote host.
Select the desired table. The Get Remote Data window reappears.
By default, this process downloads information about the table only, without downloading any rows. If you want to download some rows, perform one of these steps:
Select Number of Rows. The Get remote data OBS window appears. Select All to download all rows, or select Or type number and type a number of rows to download. Select OK.
Select Subset Data. The Build a WHERE Clause to Subset the Current Data window appears. Use this window to construct a WHERE clause. This window is described in detail in the "Report Writing" chapter in Getting Started with SAS/ASSIST.
Select OK. The table information and rows, if any, are downloaded and the table name appears as the active table.
Proceed with the task window selections and run the task by following this selection path:Run Remote submit
Behind the Scenes: Anatomy of a Remote Connect Session |
The following table provides a look at what is going on when you establish a Remote Connect session, set up and submit a task for remote execution, and terminate the session. Included are technical details on the statements being passed from the local SAS/ASSIST session to the remote SAS session.
Local SAS/ASSIST session actions: What you do | Remote SAS session actions: What the remote host does | Technical details | |
---|---|---|---|
1 | Invoke SAS/ASSIST software | n/a | n/a |
2 | Establish remote connection (Establish Connection under Remote on the Tasks menu) | Invokes SAS session | SAS/ASSIST software submits a SIGNON statement using SAS/CONNECT script |
3 | Open task window with Tasks menu | n/a | n/a |
4 |
Select Remote Data from the Remote
menu.
Note: See Assigning Librefs on Remote SAS Sessions for details on remote and local library requirements. |
Sends information on contents of all tables in all libraries to local SAS/ASSIST session | SAS/ASSIST software submits a program in an RSUBMIT block to the remote SAS session. The program creates a table containing information on tables in libraries assigned on the remote session (except SASHELP, LIBRARY, MAPS, and WORK). Table is downloaded to local SAS session. |
5 | Select Table in Get Remote Data window; list of tables appears | n/a | n/a |
6 | Select desired table, then select desired number of rows and OK in Get Remote Data window | Downloads table with user-selected number of rows (default is 0 rows) or subset | SAS/ASSIST software submits a PROC DOWNLOAD statement with appropriate options in an RSUBMIT block to the remote host. |
7 | Make task window selections | n/a | n/a |
8 | Select Remote Submit from the Run menu | Executes task and returns any output or messages to the local SAS session | SAS/ASSIST software submits task code to remote host in an RSUBMIT block. |
9 | Select Terminate Connection under Remote on the Tasks menu | Terminates SAS session and closes connection | SAS/ASSIST software submits a SIGNOFF statement. |
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.