Chapter Contents |
Previous |
Next |
COMPRESS |
Category: | Character |
Syntax | |
Arguments | |
Examples | |
Example 1: Compressing Blanks | |
Example 2: Compressing Special Characters | |
See Also |
Syntax |
COMPRESS(source<, characters-to-remove>) |
Tip: | Enclose a literal string of characters in quotation marks. |
Tip: | If you specify nothing, SAS removes blanks from source. |
Examples |
SAS Statements | Results |
---|---|
----+----1 |
|
a='AB C D '; b=compress(a); put b; |
ABCD |
SAS Statements | Results |
---|---|
----+----1 |
|
x='A.B (C=D);'; y=compress(x,'.;()'); put y; |
AB C=D |
See Also |
Functions:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.