![]() Chapter Contents |
![]() Previous |
![]() Next |
| STOP |
| Valid: | in a DATA step |
| Category: | Action |
| Type: | Executable |
| Syntax | |
| Without Arguments | |
| Details | |
| Comparisons | |
| Examples | |
| Example 1: Basic Usage | |
| Example 2: Avoiding an Infinite Loop | |
| See Also | |
Syntax |
| STOP; |
| Details |
SAS outputs a data set for the current DATA step. However, the observation being processed when STOP executes is not added. The STOP statement can be used alone or in an IF-THEN statement or SELECT group.
Use STOP with any features that read SAS data sets using random access methods, such as the POINT= option in the SET statement. Because SAS does not detect an end-of-file with this access method, you must include program statements to prevent continuous processing of the DATA step.
| Comparisons |
| Examples |
stop;
if idcode=9999 then stop;
select (a); when (0) output; otherwise stop; end;
data sample;
do sampleobs=1 to totalobs by 10;
set master.research point=sampleobs
nobs=totalobs;
output;
end;
stop;
run;
| See Also |
Statements:
| ABORT | |
| POINT= option in the SET statement |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.