javascript
Brief description  about Online courses   join in Online courses
View ved prakash singh 's Profile

presenting data in SAS

what are the different types of presentable formates in SAS for presenting the data,please explain me with some with some formates used in SAS.
Asked by ved prakash singh | Oct 14, 2010 |  Reply now
Replies (2)
View ved prakash singh 's Profile
Thanks Mr.Bansal for your kind reply.
Oct 14, 2010
View sas consultant 's Profile
Formats are used to output data in a formatted way.
e.g. as we know SAS stores date as numeric number i.e. number of days
from 01Jan1960.
So if you display date without formatting i.e.
put dt;
it will look like some thing -
18549

Which is bit difficult for user to calculate actual date from this number.
Now if you display it using format date9 e.g.
put dt date9.;
it will come out as 14OCT2010,which sounds much better.

There are number of formats,some of the most common formats are -
w.
w.d
$w
$charw.
DOLLARw.d
COMMAw.d
MMDDYY10.
DATE9.

where -
The w indicates the width (bytes or number of columns) of the
variable.
The d is used for numeric data to specify the number of digits to the right of the decimal place.
Oct 14, 2010