Using these IF-THEN/ELSE statements, SAS makes a single comparison to format a
value as well.:
if x=1 then label='Yes';
else if x=2 then label='No';
else if x=3 then label='Possibly';
A binary search is more efficient when the number of comparisons to make increases.
The greater the number of comparisons, the more efficient is the binary search.
Syntax: FORMAT Procedure
Restriction:You cannot use a SELECT statement and an EXCLUDE statement within the same
PROC FORMAT step.
Tip:You can also use appropriate global statements with this procedure. See “Global
Statements” on page 22 for a list. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.