Testing a Condition Before Creating an Observation
Sometimes you need to read a record, and hold that record
in the input buffer while you test for a specified condition before
a decision can be made about further processing. For example, the
ability to hold a record so that you can read from it again, if necessary,
is useful when you need to test for a condition before SAS creates
an observation from a data record. To do this, you can use the trailing
at-sign (@).
For example, to create a SAS data set that is a subset of a larger group of records, you might need to test for a condition to decide whether a particular record will be used to create an observation. The trailing at-sign placed before the semicolon at the end of an INPUT statement ...
Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.