Creates a Boolean variable that indicates whether the data set contributed data to the current observation.
Valid in: | DATA step |
Category: | Observation Control |
Restriction: | Use with the SET, MERGE, MODIFY, and UPDATE statements only. |
names the new variable whose value indicates whether the input data set contributed data to the current observation. Within the DATA step, the value of the variable is 1 if the data set contributed to the current observation. Otherwise, the value is 0.
I
has a value of 1 when
the observation is read from the NONUSA data set. Otherwise, the variable
has a value of 0. The IF-THEN statement checks the value of I to determine
whether the data set NONUSA contributed data to the current observation.
If I=1, the variable OVERSEAS receives an asterisk (*) as a value.
data allflts; set usa nonusa(in=i); by fltnum; if i then overseas='*'; run;