Planning Bill of Material (bome04)
/**************************************************************/
/* */
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: BOME04 */
/* TITLE: Planning Bill of Material (bome04) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: OR */
/* PROCS: BOM, PRINT, SORT */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: */
/* MISC: Example 4 from the BOM Procedure chapter of the */
/* BOM book. */
/* */
/**************************************************************/
/**************************************************************
Use PMaster3 from BOME03
**************************************************************/
/* Part master records from BOME03 */
data PMaster3;
input Part $8.
Desc $24.
Unit $8.
LeadTime 8.0
;
datalines;
1100 Finished shaft Each 2
1200 6-Diameter steel plate Each 3
1300 Hub Each 2
1400 1/4-20 Screw Each 1
1500 Steel holder Each 2
1600 One-way socket Each 2
1700 Wiring assembly Each 1
2100 3/8 Steel tubing Inches 3
2200 16-Gauge lamp cord Feet 2
2210 14-Gauge lamp cord Feet 2
2300 Standard plug terminal Each 1
A100 Socket assembly Each 1
B100 Base assembly Each 1
LA01 Lamp LA Each 2
S100 Black shade Each 2
;
/**************************************************************
Begin example
**************************************************************/
/* Generic and phantom part master data */
data Phantom4;
input Part $8.
Desc $24.
Req 8.0
Unit $8.
LeadTime 4.0
;
datalines;
LAXX Lamp LA 10000 Each 3
4000 Common parts . Each 0
A10X Socket assembly options . Each 0
B10X Base assembly options . Each 0
S10X Shade options . Each 0
;
/* Additional optional and alternative parts */
data Option4;
input Part $8.
Desc $24.
Req 8.0
Unit $8.
LeadTime 4.0
;
datalines;
A101 Three-way socket assem. . Each 1
B101 7in Base assembly . Each 1
B102 8in Base assembly . Each 1
S101 14in White shade . Each 2
S102 14in Cream shade . Each 2
S103 14in Yellow shade . Each 2
S104 15in Black shade . Each 2
S105 15in White shade . Each 2
S106 15in Cream shade . Each 2
S107 15in Yellow shade . Each 2
1201 7-Diameter steel plate . Each 3
1202 8-Diameter steel plate . Each 3
1601 Three-way socket . Each 2
;
/* Parent-component relationship data */
data ParComp4;
input Parent $8.
Component $8.
QtyPer 8.2
;
datalines;
LAXX 4000 1.00
LAXX B10X 1.00
LAXX S10X 1.00
LAXX A10X 1.00
4000 1100 1.00
4000 1300 1.00
4000 1400 4.00
4000 1500 1.00
4000 1700 1.00
B10X B100 0.32
B10X B101 0.41
B10X B102 0.33
S10X S100 0.07
S10X S101 0.18
S10X S102 0.24
S10X S103 0.10
S10X S104 0.06
S10X S105 0.14
S10X S106 0.22
S10X S107 0.10
A10X A100 0.11
A10X A101 0.92
B100 1200 1.00
B101 1201 1.00
B102 1202 1.00
A100 1600 1.00
A101 1601 1.00
1100 2100 26.00
1500 1400 2.00
1700 2200 12.00
1700 2300 1.00
;
/* Append the old part master data to the new */
/* phantom and optional part data set */
data PMaster4;
set Phantom4
Option4
PMaster3(where=(Part NE 'LA01' AND Part NE '2210'));
run;
proc sort data=PMaster4;
by Part;
run;
/* Generate the Indented BOM and Summarized Parts data sets */
proc bom data=ParComp4 pmdata=PMaster4
out=IndBOM4 summaryout=SumBOM4;
structure / part=Part
requirement=Req
leadtime=LeadTime
parent=Parent
component=Component
quantity=QtyPer
id=(Desc Unit);
run;
/* Display the indented BOM data */
proc print data=IndBOM4 noobs;
var _Level_ _Parent_ _Part_ Desc QtyPer Qty_Prod
Unit LeadTime Tot_Lead _Prod_;
title 'ABC Lamp Company';
title3 'Indented Bill of Material, Part LAXX';
run;
/* Display the summarized parts list */
proc sort data=SumBOM4;
by _Part_;
run;
proc print data=SumBOM4 noobs;
title 'ABC Lamp Company';
title3 'Summarized Parts List, Period 4';
run;