Chapter Contents

Previous

Next
$OCTALw.

$OCTALw.



Converts octal data to character data

Category: Character


Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

$OCTALw.

Syntax Description

w
specifies the width of the input field in bits. Because one digit of octal data represents three bits of binary information, increment the value of w by three for every column of octal data that $OCTALw. will read.
Default: 3
Range: 1-32767


Details

Eight bits of binary data represent the code for one digit of character data. Therefore, you need at least three digits of octal data to represent one digit of character data, which includes an extra bit. $OCTALw. treats every three digits of octal data as one digit of character data, ignoring the extra bit.

Use $OCTALw. to read octal representations of binary codes for unprintable characters. Enter an ASCII or EBCDIC equivalent for a particular character in octal notation. Then use $OCTALw. to convert it to its equivalent character value.

Use only the digits 0 through 7 in the input, with no embedded blanks. $OCTALw. ignores leading and trailing blanks.


Comparisons

The OCTALw. informat reads octal data and converts them into the numeric equivalents.


Examples

input @1 name $octal9.;

Data Lines Results
----+----1
EBCDIC ASCII
114
<
L


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.