General form for OUTPUT,
REPLACE, and REMOVE statements:
OUTPUT;
REPLACE;
REMOVE;
OUTPUT
adds the current observation
to the end of the data set.
REPLACE
writes the current
observation to the same location in the data set.
REMOVE
removes the current
observation from the data set.
|
yes
, no
,
and new
, you can submit the following
program in order to do one of the following:
no
yes
new
.
data master; set transaction; modify master key = id; a = b; if code = 'no' then remove; else if code = 'yes' then replace; else if code = 'new' then output; run;
General form, _IORC_
with the %SYSRC autocall macro:
IF _IORC_=%SYSRC (mnemonic) THEN executable_statement;
mnemonic
is a code for a specific
I/O condition.
|
Mnemonic
|
Meaning
|
---|---|
_DSENMR
|
The observation in the
transaction data set does not exist in the master data set (used only
with the MODIFY and BY statements).
|
_DSEMTR
|
Multiple transaction
data set observations do not exist in the master data set (used only
with the MODIFY and BY statements).
|
_DSENOM
|
No matching observation
(used with the KEY= option).
|
_SOK
|
The observation was
located.
|
data master; set transaction; modify master key = id; if _IORC_=%sysrc(_sok) then do; a = b; replace; end; else if _IORC_=%sysrc(_dsenom) then do; output; _ERROR_ = 0; end; run;