Previous Page | Next Page

SAS System Options

DATASTMTCHK= System Option



Specifies which SAS statement keywords are prohibited from being specified as a one-level DATA step name to protect against overwriting an input data set.
Valid in: configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Files: SAS Files
PROC OPTIONS GROUP= SASFILES

Syntax
Syntax Description
Details

Syntax

DATASTMTCHK=COREKEYWORDS | ALLKEYWORDS | NONE


Syntax Description

COREKEYWORDS

prohibits certain words as one-level SAS data set names in the DATA statement. They can appear as two-level names. The following keywords cannot appear as one-level SAS data set names:

MERGE

RETAIN

SET

UPDATE.

For example, SET is not acceptable in the DATA statement, but SAVE.SET and WORK.SET are acceptable. COREKEYWORDS is the default.
ALLKEYWORDS

prohibits any keyword that can begin a statement in the DATA step (for example, ABORT, ARRAY, INFILE) as a one-level data set name in the DATA statement.

NONE

provides no protection against overwriting SAS data sets.


Details

If you omit a semicolon in the DATA statement, you can overwrite an input data set if the next statement is SET, MERGE, or UPDATE. Different, but significant, problems arise when the next statement is RETAIN. DATASTMTCHK= enables you to protect yourself against overwriting the input data set.

Previous Page | Next Page | Top of Page