write them while preventing a step from executing until you have entered all the
statements.
What Causes a DATA Step to Stop Executing
DATA steps stop executing under different circumstances, depending on the type and
number of sources of input.
Table 18.4 Causes That Stop DATA Step Execution
Data Read Data Source SAS Statements DATA Step Stops
no data after only one
iteration
any data when it executes
STOP or ABORT
when the data is
exhausted
raw data instream data lines INPUT statement after the last data
line is read
one external file INPUT and INFILE
statements
when end-of-file is
reached
multiple external
files
INPUT and INFILE
statements
when end-of-file is
first reached on any
of the files
observations sequentially one SAS data set SET and MODIFY
statements
after the last
observation is read
multiple SAS data
sets
one SET, MERGE,
MODIFY, or
UPDATE statement
when all input data
sets are exhausted
multiple SAS data
sets
multiple SET,
MERGE, MODIFY,
or UPDATE
statements
when end-of-file is
reached by any of
the data-reading
statements
A DATA step that reads observations from a SAS data set with a SET statement that uses
the POINT= option has no way to detect the end of the input SAS data set. (This method
is called direct or random access.) Such a DATA step usually requires a STOP statement.
A DATA step also stops when it executes a STOP or an ABORT statement. Some system
options and data set options, such as OBS=, can cause a DATA step to stop earlier than it
would otherwise.
If the VARINITCHK= system option is set to ERROR, a DATA step stops processing
and writes an error to the SAS log if a variable is not initialized. For more information,
see “VARINITCHK= System Option” in SAS System Options: Reference.
414 Chapter 18 DATA Step Processing
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.17.27