Previous Page | Next Page

Understanding DATA Step Processing

Review of SAS Tools


Statements

DELETE;

prevents SAS from writing a particular observation to the output data set. It usually appears as part of an IF-THEN/ELSE statement.

If condition THEN action ELSE action;

tests whether the condition is true. When the condition is true, the THEN statement specifies the action to take. When the condition is false, the ELSE statement provides an alternative action. The action can be one or more statements, including assignment statements.

LENGTH variable <$> length;

assigns the number of bytes of storage (length) for a variable. Include a dollar sign ($) if the variable is character. The LENGTH statement must appear before the first use of the variable.

variable=expression;

is an assignment statement. It causes SAS to evaluate the expression on the right side of the equal sign and assign the result to the variable on the left. You must select the name of the variable and create the proper expression for calculating its value. The same variable name can appear on the left and right sides of the equal sign because SAS evaluates the right side before assigning the result to the variable on the left side.

Previous Page | Next Page | Top of Page