Bill of Material Postprocessing Macros

Input Data Sets

(View the complete code for this example.)

All SAS macros described in this chapter use a SAS input data set that contains the indented bill of material for all end items of the product line, plant, or company. This data set is referred to as the Indented BOM data set. It is typically the Indented BOM output data set created by PROC BOM. See Indented BOM Data Set in Chapter 3 for details about the variables and special structure of this SAS data set. Not every variable in the Indented BOM data set is needed in all macros. The variables required by each macro depend on the requirements of the macro, and are listed in the corresponding section describing each macro. Note that the macros depend heavily on the form of the Indented BOM data set that

  • contains the complete indented bill of material for each end item.

  • lists the components of each indented bill of material in the depth-first order.

Refer to Aho, Hopcroft, and Ullman (1983) for details about depth-first ordering. See also Indented BOM Data Set in Chapter 3 for details regarding the records in this data set.

A simple Indented BOM data set, IndBOM, is displayed in Figure 1. It contains two indented bill of material, one for the item 'A101' and the other for the item 'LA01'. You can easily check that each indented bill of material in this data set lists its components in depth-first order. The data set IndBOM is used as the Indented BOM input data set in all examples in this chapter.

You specify the name of the Indented BOM data set using the IN= parameter. If you do not provide a name when calling a postprocessing macro, the macro uses the most recently created SAS data set as the Indented BOM data set.

One SAS macro, %BOMTCNP, requires an additional data set that contains the product structure record for the new parent-component relationship that will be created while performing the copy-and-paste transaction. This data set is referred to as the Product Structure data set. See Product Structure Data Set in Chapter 3 for details about this SAS data set.

Another SAS macro, %BOMTSAE, requires another data set that contains the part master record for the item specified in the ROOT= parameter of the macro. This data set is referred to as the Part Master data set. See Part Master Data Set in Chapter 3 for details about this SAS data set.

Figure 1: Indented BOM Data Set (IndBOM)

ABC Lamp Company
 
Indented Bill of Material

Obs_Level__Parent_Paren_ID_Part_Part_IDDescQtyPerFscrapQty_ProdUnitLeadTimeTot_LeadLTOffTot_OffSDateEDate_Prod_
10 .A1010Three-way socket assem...1Each11.0..A101
21A101015001Steel holder10.01Each2300..A101
3215001140021/4-20 Screw20.02Each1400..A101
41A101016013Three-way socket10.01Each2300..A101
51A101017004Wiring assembly10.01Each1200..A101
62170042200516-Gauge lamp cord120.112Feet2400.07APR2001A101
72170042210614-Gauge lamp cord120.112Feet240008APR2001.A101
821700423007Standard plug terminal10.01Each1300..A101
90 .LA018Lamp LA..1Each22.0..LA01
101LA018A1009One-way socket assem.10.01Each1322..LA01
112A1009150010Steel holder10.01Each2502..LA01
1231500101400111/4-20 Screw20.02Each1602..LA01
132A1009160012One-way socket10.01Each2502..LA01
142A1009170013Wiring assembly10.01Each1402..LA01
15317001322001416-Gauge lamp cord120.112Feet2602.07APR2001LA01
16317001322101514-Gauge lamp cord120.112Feet260208APR2001.LA01
173170013230016Standard plug terminal10.01Each1502..LA01
181LA018B10017Base assembly10.01Each1300..LA01
192B10017110018Finished shaft10.01Each2500..LA01
2031100182100193/8 Steel tubing260.226Inches3800..LA01
212B100171200206-Diameter steel plate10.01Each3600..LA01
222B10017130021Hub10.01Each2511..LA01
232B100171400221/4-20 Screw40.04Each1433..LA01
241LA018S10023Black shade10.01Each2400..LA01


Last updated: August 11, 2020