Converts character data to octal representation.
Category: |
Character
|
Alignment: |
left
|
-
w
-
specifies the width of the output field.
Default: |
The default width is
calculated based on the length of the variable to be printed. |
Range: |
1-32767 |
Tip: |
Because each character
value generates three octal characters, increase the value of w by three times the length of the character
value. |
The $OCTALw.
format converts character values to the octal representation of their character
codes. The OCTALw. format converts numeric values
to octal representation.
The following example shows ASCII output when you use
the $OCTALw. format.
data _null_;
infile datalines truncover;
input item $5.;
put item $octal15.;
datalines;
art
rice
bank
;
run;
SAS writes the following results to the log.
141162164040040
162151143145040
142141156153040
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.