Use BYTE function to create special ASCII character, e.g. plus/minus sign

This post was kindly contributed by SAS & Statistics - go there to comment and to read the full post.

data _null_;
&nbsp &nbsp &nbsp do i=0 to 255;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp x=byte(i);
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp put i= x=;
&nbsp &nbsp &nbsp end;
&nbsp &nbsp &nbsp y=rank(‘a’);
&nbsp &nbsp &nbsp put y=;
run;

BYTE function results:
i=65 — 90 x=A — Z

i=97 — 122 x=a — z

i=33 x=!
i=34 x=”
i=35 x=#
i=36 x=$
i=37 x=%
i=38 x=&
i=39 x=’
i=40 x=(
i=41 x=)
i=42 x=*
i=43 x=+
i=44 x=,
i=45 x=-
i=46 x=.
i=47 x=/

i=162 x=¢
i=163 x=£
i=164 x=¤
i=165 x=¥
i=166 x=¦
i=167 x=§
i=168 x=¨
i=169 x=©
i=170 x=ª
i=171 x=«
i=172 x=¬
i=173 x=­
i=174 x=®
i=175 x=¯
i=176 x=°
i=177 x=±
i=178 x=²
i=179 x=³
i=180 x=´
i=181 x=µ
i=182 x=¶
i=183 x=•
i=184 x=¸
i=185 x=¹
i=186 x=º
i=187 x=»
i=188 x=¼
i=189 x=½
i=190 x=¾

RANK function results:
y=97

This post was kindly contributed by SAS & Statistics - go there to comment and to read the full post.