VMSZNw.d Format

Generates VMS and MicroFocus COBOL zoned numeric data.

Category: Numeric
Alignment: Left

Syntax

VMSZNw.d

Syntax Description

w

specifies the width of the output field.

Default 1
Range 1–32

d

specifies the number of digits to the right of the decimal point in the numeric value. This argument is optional.

Details

The VMSZNw.d format is similar to the ZDw.d format. Both generate a string of ASCII digits, and the last digit is a special character that denotes the magnitude of the last digit and the sign of the entire number. The difference between these formats is in the special character that is used for the last digit. The following table shows the special characters that are used by the VMSZNw.d format.
Desired
Digit
Special
Character
Desired
Digit
Special
Character
0
0
–0
p
1
1
–1
q
2
2
–2
r
3
3
–3
s
4
4
–4
t
5
5
–5
u
6
6
–6
v
7
7
–7
w
8
8
–8
x
9
9
–9
y
If the value to be formatted is too large to fit in a field of the specified width, then the VMSZNw.d format does the following:
  • For positive values, it sets the output to the largest positive number that fits in the given width.
  • For negative values, it sets the output to the negative number of greatest magnitude that fits in the given width.

Example

SAS Statement
Result
----+----1
x=1234;
put x vmszn4.;
 
1234
x=1234;
put x vmszn5.1;
 
12340
x=1234;
put x vmszn6.2;
 
123400
x=-1234;
put x vmszn5.;
 
0123t

See Also

Formats:
Informats: