Chapter Contents |
Previous |
Next |
ZDVw.d |
Language element: | informat |
Category: | Numeric |
Width range: | 1 to 32 |
Default width: | 1 |
OpenVMS specifics: | All aspects are host-specific |
Syntax | |
Details | |
Examples | |
See Also |
Syntax |
ZDVw.d |
Details |
In Release 6.07 of the SAS System, the ZDVw.d informat replaced the ZDw.d informat with one change: although the string must be a true trailing numeric with overpunch format, it no longer needs to be right-justified within its field. Trailing blanks are trimmed before the number is converted.
A zoned decimal, or trailing numeric string with overpunch format, is a character string that consists of digits. The last character of the string is a special character that specifies both the value of the last digit and the sign of the entire number. The special characters are the same as those that are documented for the ZDw.d informat, as shown in the following table.
Digit | ASCII Character |
Digit | ASCII Character |
|
---|---|---|---|---|
0 | { | -0 | } | |
1 | A | -1 | J | |
2 | B | -2 | K | |
3 | C | -3 | L | |
4 | D | -4 | M | |
5 | E | -5 | N | |
6 | F | -6 | O | |
7 | G | -7 | P | |
8 | H | -8 | Q | |
9 | I | -9 | R |
The data formatted using the ZDVw.d informat are ASCII strings.
Examples |
If you format the ASCII string 123{ using ZDVw.d informat in the following SAS statement:
input i zd4.;the result is 1230.
If you format the ASCII string 123} using the ZDVw.d informat in the following SAS statement:
input i zd4.;the result is -1230.
If you format the ASCII string 1230 using the ZDVw.d informat in the following SAS statement:
input i zd4.;the result is invalid data.
If you format the ASCII string -1230 using the ZDVw.d informat in the following SAS statement:
input i zd5.;the result is invalid data.
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.