Previous Page | Next Page

SAS System Options

TERMSTMT= System Option



Specifies the SAS statements to execute when SAS terminates.
Valid in: configuration file, SAS invocation
Category: Environment control: Initialization and operation
PROC OPTIONS GROUP= EXECMODES

Syntax
Syntax Description
Details
Comparisons
See Also

Syntax

TERMSTMT='statement(s)'


Syntax Description

'statement(s)'

is one or more SAS statements.

Maximum length: 2,048 characters

Operating Environment Information:   In some operating system environments there is a limit to the size of the value for TERMSTMT=. To circumvent this limitation, you can use the %INCLUDE statement.  [cautionend]


Details

TERMSTMT= is fully supported in batch mode. In interactive modes, TERMSTMT= is executed only when you submit the ENDSAS statement from an editor window to terminate the SAS session. Terminating SAS by any other means in interactive mode results in TERMSTMT= not being executed.

An alternate method for specifying TERMSTMT= is to put a %INCLUDE statement at the end of a batch file or to submit a %INCLUDE statement before terminating the SAS session in interactive mode.


Comparisons

TERMSTMT= specifies the SAS statements to be executed at SAS termination, and INITSTMT= specifies the SAS statements to be executed at SAS initialization.


See Also

System Option:

INITSTMT= System Option

Statement:

%INCLUDE Statement

Previous Page | Next Page | Top of Page