Category:Zw. Format

From sasCommunity

Jump to: navigation, search

SAS has a special numeric format to append leading zeros called Zw.d This greatly helps with all numeric and character data recieved that requires leading zeroes during SAS processing

Requirements

w -> Width of variable.

This should account for the value, the decimal point, and a minus sign depending on requirements


d -> Decimal Point.

If d is 0 or if you omit d, Zw.d writes the value without a decimal point.


For eg. To generate a char var with length 6 by appending leading zeroes using Zw.d

var_y = put (var_y, z6.);


Practical use

- To format client_nos, group_nos, social_security_nos, procedure_codes etc


Articles in category "Zw. Format"

There are 0 articles in this category.

Personal tools