A classic example of this is creating a tab delimited file using a data _null_ step.
data _null_;
set myData;
put @01 var1 '09'x
@10 var2 '09'x
;
run;
Another useful time to specify hex characters is to get rid of them. Suppose you
have some "dirty data" that somehow has some weird non-printable characters in it. You look at the text using the hex32 format and discover that some form feed characters somehow snuck into there (0x0C). The easiest way to get rid of them is to compress() the variable. Such as
myVar = compress(myVar,'0C'x);
This will remove all occurrences of the character specified from the text variable.
No comments:
Post a Comment