|
Using the
Perm.Powrcost data set, permanently associate
formats with variables. |
- Copy the program below and paste it into the Program Editor window
(or issue the command
copy sashelp.oltutor.
.source ). A LIBNAME statement and a FILENAME statement
have already been submitted for you.
data perm.powrcost;
infile powerdat;
input FirstDay date7.
@10 LastDay date7.
@19 KwhUsed 4.
@25 KwhRate 5.;
Days=lastday-firstday+1;
AverageCost=(kwhused*kwhrate)/days;
proc print data=perm.powrcost;
run;
- Add a FORMAT statement to the DATA step that formats the following:
LastDay DATE9.
FirstDay DATE9.
AverageCost DOLLAR5.2
- Submit the program and view the PROC PRINT output.
Return here and select Next.
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA.
All rights reserved.
Terms of Use & Legal Information
| Privacy Statement