Modifying SAS Data Sets |
In this section you will look at examples from an inventory tracking system that is used by a tool vendor. The examples use the SAS data set INVENTORY as input. The data set contains these variables:
The following program creates and displays the INVENTORY data set:
options pagesize=60 linesize=80 pageno=1 nodate; data inventory; input PartNumber $ Description $ InStock @17 ReceivedDate date9. @27 Price; format ReceivedDate date9.; datalines; K89R seal 34 27jul1998 245.00 M4J7 sander 98 20jun1998 45.88 LK43 filter 121 19may1999 10.99 MN21 brace 43 10aug1999 27.87 BC85 clamp 80 16aug1999 9.55 NCF3 valve 198 20mar1999 24.50 KJ66 cutter 6 18jun1999 19.77 UYN7 rod 211 09sep1999 11.55 JD03 switch 383 09jan2000 13.99 BV1E timer 26 03aug2000 34.50 ;
proc print data=inventory; title 'Tool Warehouse Inventory'; run;
The following output shows the results:
Tool Warehouse Inventory 1 Part In Received Obs Number Description Stock Date Price 1 K89R seal 34 27JUL1998 245.00 2 M4J7 sander 98 20JUN1998 45.88 3 LK43 filter 121 19MAY1999 10.99 4 MN21 brace 43 10AUG1999 27.87 5 BC85 clamp 80 16AUG1999 9.55 6 NCF3 valve 198 20MAR1999 24.50 7 KJ66 cutter 6 18JUN1999 19.77 8 UYN7 rod 211 09SEP1999 11.55 9 JD03 switch 383 09JAN2000 13.99 10 BV1E timer 26 03AUG2000 34.50
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.