Chapter Contents |
Previous |
Next |
RSUBMIT Command and RSUBMIT Statement |
Local |
Syntax | |
Syntax Description | |
Username and Password Naming Conventions | |
Example |
Syntax |
RSUBMIT <remote-session-id><CONNECTWAIT=YES|NO> <MACVAR=value> <CONNECTSTATUS=YES|NO> <SYSRPUTSYNC=value> <USER=username|_PROMPT_> <PASSWORD=password|_PROMPT_> <PERSIST=YES|NO> <SCRIPT=value>; |
The options characterize the environment in which statements are submitted to a remote session for processing.
The primary difference between the command and the statement is that the command can be used only from a windowing environment session or within the DM statement. The RSUBMIT statement can be used in any type of SAS session on the local host.
Execute the RSUBMIT command from the command line of the local Program Editor window. Or you can embed the RSUBMIT command within a DM statement, which treats commands as if they were issued from a windowing environment command line. You can also use the KEYS window to assign the RSUBMIT command to a key. See the online help in the SAS windowing environment for details about the KEYS window.
RSUBMITs are processed in either synchronous or asynchronous modes.
The autosignon feature of RSUBMIT includes an implicit SIGNON in the absence of a current connection. The RSUBMIT command or statement automatically executes a SIGNON and uses any globally set SAS/CONNECT options along with any connection options that are specified with RSUBMIT. The autosignon first signs on to the remote session and then executes the RSUBMIT. All SIGNON options are also valid for RSUBMIT. Furthermore, a default automatic SIGNOFF occurs at the conclusion of RSUBMIT, but the SIGNOFF can be overridden by specifying PERSIST=YES.
Note: Any connection information that is specified in RSUBMIT for autosignon
will be in effect for the entire connection. For example, if you specify WAIT=NO
in an RSUBMIT that automatically signs on, then asynchronous RSUBMITs will
be the default for the entire connection, but these RSUBMITS can be overridden
in individual RSUBMITS.
The RSUBMIT command can be used to execute most types of SAS programs on the remote host.(footnote 1)
The RSUBMIT statement is particularly useful for running SAS/CONNECT from an interactive line-mode session or as a non-interactive job. The RSUBMIT and the ENDRSUBMIT statements enable you to include statements that should be processed by the local host in the same file as statements that are to be processed by the remote host. The statements for the remote host are enclosed between the RSUBMIT and the ENDRSUBMIT statements. All of the other statements in the program are processed by the local host when you execute the program.
The following template can be used to build a file that includes statements for both the remote and local hosts in the same program:
statements for local host rsubmit; statements for remote host endrsubmit;
Note: The DOWNLOAD and the UPLOAD
procedures must be executed by using the RSUBMIT command or the RSUBMIT statement.
You cannot execute them by using the SUBMIT command.
The following are optional in the RSUBMIT command/statement. Any combination of these options may be used:
PROCESS= was made an alias for REMOTE= in order to give you the option of differentiating between an RSUBMIT to a remote session on a local host (MP CONNECT) and an RSUBMIT to a remote session on a remote host. REMOTE= and PROCESS= can be used interchangeably.
In asynchronous processing, when the RSUBMIT begins to execute on the remote host, you regain control of your local SAS session to continue local processing or to use RSUBMIT to other remote sessions.
If the WAIT= option to RSUBMIT is omitted, the value assigned to WAIT=, if any, that is specified on SIGNON is used. Otherwise, the WAIT= global option is queried, and its value is used. The default is to execute synchronously.
The value for the WAIT= option must be either of these:
YES|Y | indicates a synchronous RSUBMIT. |
NO|N | indicates an asynchronous RSUBMIT. |
If WAIT=NO is specified, it will also be useful to specify the MACVAR= option. This will allow you to test the status of the current asynchronous RSUBMIT by determining whether it has completed or is still in progress.
When %SYSRPUT executes within a synchronous (WAIT=YES) remote submit, the macro variable is defined to the local SAS session as soon as it executes.
When %SYSRPUT is executed within an asynchronous (WAIT=NO) remote submit, the macro variable is not set in the local session until a synchronization point. This is the default. See %SYSRPUT Statement for more details about synchronization points.
If WAIT=NO is specified and an autosignon is performed, an automatic SIGNOFF will not occur unless PERSIST=NO is also specified.
0 | indicates that the RSUBMIT is complete. |
1 | indicates that the RSUBMIT failed to execute. |
2 | indicates that the RSUBMIT is still in progress. |
Note: If a synchronous RSUBMIT (WAIT=YES) is issued
while an asynchronous RSUBMIT (WAIT=NO) is still in progress, all spooled
log and output statements are merged into the local log and output windows.
Then the RSUBMIT continues at whatever point it is at as if it were synchronous.
That is, the user does not regain control until the RSUBMIT has completed.
If you don't want this to happen, use the MACVAR= option in the SIGNON or
the RSUBMIT statements so that you can check the progress of RSUBMIT without
causing it to execute synchronously.
The value for this option must be one of the following:
YES|Y | status window is displayed for file transfers within this RSUBMIT. |
NO|N | status window is NOT displayed for file transfers within this RSUBMIT. |
If this option is omitted from the RSUBMIT statement, the value (if any) that is specified in the SIGNON statement is used. If not specified in either the RSUBMIT or the SIGNON statement, the CONNECTSTATUS= global option is queried, and its value is used. To display the Transfer Status window is the default. Again, the STATUS option in the RSUBMIT statement only affects transfers for that specific RSUBMIT.
Note: This option is useful only when an asynchronous
(WAIT=NO) remote submit is executed; otherwise, it is ignored.
The value for this option must be one of the following:
YES | the user is able to override the default asynchronous remote submit behavior, and forces the macro variables to be defined as soon as %SYSRPUT executes. |
NO | the macro variables are not set in the local session until a synchronization point. |
Valid values for PASSWORD are:
YES | A connection to the remote session on the local host persists, which means that a signoff is not automatically performed after the SIGNON and RSUBMIT have completed. A YES setting eliminates the need to sign on for subsequent task processing. A persistent connection to the remote session on the local host terminates when you perform an explicit SIGNOFF. |
NO | A connection to the remote session does not persist. A signoff is automatically performed after the SIGNON and RSUBMIT have completed. A NO setting requires that you explicitly sign on for subsequent task processing. The default is NO. If WAIT=NO is specified and an autosignon is performed, an automatic SIGNOFF will not occur unless PERSIST=NO is also specified. |
When the RSUBMIT command executes, the usual SAS log messages for the remote SAS System display in your local LOG window. When the link has been successfully established, the following message is displayed:
NOTE: REMOTE SIGNON TO remote-session-id COMPLETE.
Username and Password Naming Conventions |
Each username and password is limited to 256 characters that follow these conventions:
Examples:
user=joe password=Born2run user=joe password='' # null space specified by contiguous quotation marks user='joe black' password='Born 2 run' user='joe?black' password='Born 2 run' user='apexdomain\joe' password=born2run # Win NT username user='"crazy joe"' pw=_prompt_; user=_prompt_;
Example |
libname remtdata 'external-file-name'; proc summary data=remtdata.clinic; class diagnose; var age income visits; output out=sumstat n= mean= mage mincome mvisits; run; proc download data=sumstat out=summary; run;
To execute the program on the remote system, enter
RSUBMIT
on the command line of the Program Editor window. Alternatively,
you can press the RSUBMIT function key.
For an example of using compute sevices for MP CONNECT, see Example 6. Compute Services: Using MP CONNECT for Multi-Processing.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.