Chapter Contents

Previous

Next
SAS/CONNECT User's Guide

How to Use Compute Services


Synchronous Remote Submits

Compute Services allows you to remote submit SAS/CONNECT tasks to execute on a remote host. You can take advantage of more powerful processors and other resources that are available on your network. By default, control over your local SAS session is not regained until the remote processing is complete. The sequential nature of this type of processing is called synchronous processing. The results from synchronous processing are automatically transferred to your local host upon completion.

The SAS/CONNECT asynchronous processing feature allows you to perform the remote processing in parallel to your local processing and retrieve the accumulated log and output at a later time.

Synchronous processing may be more advantageous than asynchronous processing in some situations, such as when a task is known to execute relatively quickly on a remote host. Because the results of the remote processing are automatically transferred back to the local session, this alleviates any extra steps you must take to retrieve your results and ensures that the results are returned as soon as they are available.

If you use the WAIT=YES option, the local SAS session will wait until the remote processing is complete before returning local control to you. This is the default processing technique for RSUBMIT if the WAIT= option is not specified.


Asynchronous Remote Submits

Asynchronous processing allows you to remote submit SAS/CONNECT tasks and immediately resume local processing. By using the WAIT=NO option in the RSUBMIT statement, you indicate that the local SAS session is not to wait until completion of the remote task before returning local control to you. Therefore, you can continue local processing (this includes submitting additional processes to other remote hosts) immediately.

SAS/CONNECT stores the accumulated log and output lines from the remote process until you request the data by using the RGET command. After the RGET command is issued, the accumulated output is retrieved and merged with the local output.

By using the RDISPLAY command, you can view the contents of the accumulated log and output without interrupting the asynchronous processing of the remote submit. After the RDISPLAY command is issued, two windows are created. One window displays the contents of the accumulated log and the other window displays the accumulated output. The presentation of two windows provides a means to view accumulated log and output without merging them into your local log and output windows.

You can also specify a macro variable by using the MACVAR= option in the RSUBMIT statement. This macro variable can be tested to see if the remote processing has finished.

Note:   The system option _LAST_, which is used to specify the name of the most recently created data set, is not updated for asynchronous remote submits. Many intervening DATA steps and/or procedures could have been processed before the asynchronous remote submit completes, thus making the system option _LAST_ meaningless for the asynchronous submission.  [cautionend]


MP CONNECT

Version 8 introduces support for parallel (or multi-) processing with Multi-Process (MP) CONNECT. This facility exploits a local host's multi-processor capability by allowing parallel processing of self-contained tasks and the coordination of all the results into the original SAS session. SAS/CONNECT accomplishes multi-processing by means of a new SASCMD option, which establishes a connection to one or more "remote" SAS sessions that run on the local host. MP CONNECT's "remote" session actually executes on the local host.

Note:   MP CONNECT is available with the TCP/IP access method only.  [cautionend]

To exploit MP CONNECT, you use options in the SIGNON and RSUBMIT statements to identify one or more tasks to be processed by a "remote" SAS session. The remote host identifier is supplied by either the REMOTE= or the PROCESS= option, which is an alias for REMOTE=. In this context, the identifier does not identify the remote host but is an arbitrary name that you associate with a specific task.

MP CONNECT provides the SASCMD= option, which enables signon to the local host's processor. The WAITFOR statement allows you to wait for one or more asynchronously executing tasks before returning control to the local session. The LISTTASK statement lists all active or completed tasks.


Output Delivery System

The Output Delivery System (ODS) is used to manage the results of a procedure by allowing you to make changes to the format and appearance of SAS output. Using compute services, you can generate ODS output from a remote host when using either a synchronous or an asynchronous remote submit. ODS statements and procedures that support ODS can be used to

For more information about the Output Delivery System, see The Complete Guide to the SAS Output Delivery System.

There are four basic ways to use compute services and ODS to manage the output that is produced on a remote host.

  1. Remote submit ODS statements and procedure statements to produce the ODS output on the remote host.

    Processing and output generation takes place entirely on the remote host. Therefore, the resulting output (for example, HTML or a data set) must be downloaded from the remote host to the local host.

  2. Remote submit procedure statements without any ODS statements.

    Any output that is produced by the remote submit produces a node in the Results window that has the name Rsubmit: remote-session-id. The Results window uses ODS to generate pointers (nodes) to various locations in the Output window. The resulting node is a record of the output generated during a SAS session. A remote submit node can be accessed by clicking the plus sign (+) next to the Rsubmit line using the left mouse button. The subtitle Rsubmit Output will appear as the next item in the tree structure. Using the right mouse button, select the subtitle line and open the file by using the pop-up menu. The Output window will be refocused to the top of the remote submit output.

    Note:   If an asynchronous remote submit is used, the node does not appear in the Results window until RGET is executed.  [cautionend]

  3. Enclose the remote submit block (RSUBMIT through ENDRSUBMIT) with ODS statements.

    The output from the remote submit will be saved into an HTML object. If the object is selected, a browser is invoked and the output is displayed in a simple monospace listing format.

    Note:   For a condition when a monospace listing is not suitable, refer to the first option for managing the output from a remote host, remote submit the ODS statement, and download the results.  [cautionend]

    If an asynchronous remote submit is used, the ods html statements must enclose the RGET statement.

  4. Precede RSUBMIT with the ods data set statement.

    The output from the remote submit appears in the Output window and is saved as a SAS data set.

    If an asynchronous remote submit is used, the ods data set statements must enclose the RGET statement.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.