Procedure features: |
PROC
FORMAT statement options:
|
PICTURE statement options:
|
LIBRARY libref |
LOW and HIGH
keywords |
|
Data set: |
|
This example uses a PICTURE statement
to create a format that prints
the values for the variable Salary in the data set PROCLIB.STAFF in U.S. dollars.
|
libname proclib 'SAS-library-1 ';
libname library 'SAS-library-2'; |
|
options nodate pageno=1 linesize=80 pagesize=40; |
|
proc format library=library; |
|
picture uscurrency low-high='000,000' (mult=1.61 prefix='$');
run; |
|
proc print data=proclib.staff noobs label; |
|
label salary='Salary in U.S. Dollars';
format salary uscurrency.; |
|
title 'PROCLIB.STAFF with a Format for the Variable Salary';
run; |
PROCLIB.STAFF with a Format for the Variable Salary 1
Salary in
Id U.S. Hire
Name Number Dollars Site Date
Capalleti, Jimmy 2355 $34,072 BR1 30JAN79
Chen, Len 5889 $33,771 BR1 18JUN76
Davis, Brad 3878 $31,509 BR2 20MAR84
Leung, Brenda 4409 $55,256 BR2 18SEP74
Martinez, Maria 3985 $78,980 US2 10JAN93
Orfali, Philip 0740 $80,648 US2 16FEB83
Patel, Mary 2398 $56,643 BR3 02FEB90
Smith, Robert 5162 $64,561 BR5 15APR86
Sorrell, Joseph 4421 $62,403 US1 19JUN93
Zook, Carla 7385 $37,010 BR3 18DEC91
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.