ENDRSUBMIT Statement

Marks the end of a block of statements that a client session submits to a server session for execution.
Valid in: client session

Syntax

ENDRSUBMIT <CANCEL> ;

Syntax Description

CANCEL
This option is useful in an interactive line mode session if you see an error in a previously entered statement, and you want to cancel the step.

Details

The ENDRSUBMIT statement signals the end of a block of statements that begins with either of the following lines of code:
dm 'rsubmit';  
or
rsubmit;       
The server session executes the statements between either of these statements and the ENDRSUBMIT statement.
Note: Do not use the ENDRSUBMIT statement when using the RSUBMIT command. Use it only when you use the RSUBMIT statement or the DM RSUBMIT statement.
The ENDRSUBMIT statement can be used in any type of client session: a SAS windowing environment, an interactive line mode session, or a batch job. The RSUBMIT and ENDRSUBMIT statements enable you to include in the same file statements that are executed in the client session and statements that are executed in the server session. The statements to be executed in the server session are enclosed between the RSUBMIT and ENDRSUBMIT statements.
All of the other statements in the program are executed in the client session when you run the program. Here is a template for the arrangement of statements for the server and client sessions in the same program:
statements for client session
rsubmit;
   statements for server session
endrsubmit;
more statements for client session
Note: Do not put a comment between the ENDRSUBMIT statement and the semicolon. Doing so will cause an error message to be displayed in the SAS Log and can cause unexpected results in your output.