Skip to Main Content
SAS 9.4 Language Reference, Second Edition
book

SAS 9.4 Language Reference, Second Edition

by SAS Institute
December 2013
Intermediate to advanced content levelIntermediate to advanced
824 pages
24h 21m
English
SAS Institute
Content preview from SAS 9.4 Language Reference, Second Edition
You can compare only a specified prefix of a character expression by using a colon (:)
after the comparison operator. SAS truncates the longer value to the length of the shorter
value during the comparison. In the following example, the colon modifier after the
equal sign tells SAS to look at only the first character of values of the variable LastName
and to select the observations with names beginning with the letter S:
if lastname=:'S';
Because printable characters are greater than blanks, both of the following statements
select observations with values of LastName that are greater than or equal to the letter S:
if lastname>='S';
if lastname>=:'S';
Note: If you compare a zero-length character value with any other character value in
either ...
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.
Start your free trial

You might also like

What's New in SAS 9.4

What's New in SAS 9.4

SAS Institute
Fiber Optic Cabling, 2nd Edition

Fiber Optic Cabling, 2nd Edition

Barry Elliott, Mike Gilmore

Publisher Resources

ISBN: 9781629590004