Bill of Material Postprocessing Macros


%BOMTDEL: Multiple-Delete Transaction

%bomtdel (

ROOT=root, IN=SAS-data-set, LEV=variable,

 

COMP=variable, OUT=SAS-data-set);

performs the multiple-delete transaction, which removes the entire bill of material for the item specified in the ROOT= parameter (referred to as item Root) in all its appearances. The parameters for this macro are as follows:

ROOT=root

specifies the part number of the item for which the bill of material is deleted from the Indented BOM data set. This item is referred to as the item Root. You must specify either a number or a quoted string for the ROOT= parameter, depending on the type of the Component variable.

IN=SAS-data-set

names the Indented BOM input data set. The default value is the most recently created SAS data set. A null value is replaced by the default value.

LEV=variable

identifies the variable in the Indented BOM data set that contains the indenture level information. The default value is _Level_. A null value is replaced by the default value.

COMP=variable

identifies the variable in the Indented BOM data set that contains the component’s part number. This variable is referred to as the Component variable. The default value is _Part_. A null value is replaced by the default value.

OUT=SAS-data-set

names the output data set that contains the modified indented bill of material. The default value is _BOMOUT_. A null value is replaced by the default value.

The Input Data Set

The input data set of this macro is the Indented BOM data set described in Input Data Sets.

The following parameters specify the variables in the input data set that are required by the %BOMTDEL macro.

COMP=

A character or numeric variable that contains the part number of the component.

LEV=

A numeric variable that contains the indenture level information.

The Output Data Set

The output data set of this macro contains all the bill of material in the input data set except for the complete bill of material for the item Root, which is removed from the input data set in all places where the item Root appears. This data set has the same variables as the Indented BOM input data set.

Macro Variable _BOMTDEL_

Upon completion, this macro defines a macro variable, _BOMTDEL_, which contains a character string that indicates the status of the macro execution. See Macro Variables for the possible values of this macro variable.

An Example

In this example, the engineers of the ABC Lamp Company decide to retire the item '2200'. The following code invokes the %BOMTDEL macro to remove the item '2200' from the Indented BOM data set, IndBOM, as displayed in Figure 4.1.

%bomtdel(root='2200', in=IndBOM, out=BomOut8);

The data set BomOut8 displayed in Figure 4.10 contains the updated indented bill of material of the company. Note that the item '2200' is removed from both bill of material for the end items ''A101 and 'LA01'.

Figure 4.10: Indented Bill of Material Updated by the Multiple-Delete Transaction (BomOut8)

ABC Lamp Company
%BOMTDEL macro
Indented Bill of Material

Obs _Level_ _Parent_ Paren_ID _Part_ Part_ID Desc QtyPer Fscrap Qty_Prod Unit LeadTime Tot_Lead LTOff Tot_Off SDate EDate _Prod_
1 0   . A101 0 Three-way socket assem. . . 1 Each 1 1 . 0 . . A101
2 1 A101 0 1500 1 Steel holder 1 0.0 1 Each 2 3 0 0 . . A101
3 2 1500 1 1400 2 1/4-20 Screw 2 0.0 2 Each 1 4 0 0 . . A101
4 1 A101 0 1601 3 Three-way socket 1 0.0 1 Each 2 3 0 0 . . A101
5 1 A101 0 1700 4 Wiring assembly 1 0.0 1 Each 1 2 0 0 . . A101
6 2 1700 4 2210 6 14-Gauge lamp cord 12 0.1 12 Feet 2 4 0 0 08APR2001 . A101
7 2 1700 4 2300 7 Standard plug terminal 1 0.0 1 Each 1 3 0 0 . . A101
8 0   . LA01 8 Lamp LA . . 1 Each 2 2 . 0 . . LA01
9 1 LA01 8 A100 9 One-way socket assem. 1 0.0 1 Each 1 3 2 2 . . LA01
10 2 A100 9 1500 10 Steel holder 1 0.0 1 Each 2 5 0 2 . . LA01
11 3 1500 10 1400 11 1/4-20 Screw 2 0.0 2 Each 1 6 0 2 . . LA01
12 2 A100 9 1600 12 One-way socket 1 0.0 1 Each 2 5 0 2 . . LA01
13 2 A100 9 1700 13 Wiring assembly 1 0.0 1 Each 1 4 0 2 . . LA01
14 3 1700 13 2210 15 14-Gauge lamp cord 12 0.1 12 Feet 2 6 0 2 08APR2001 . LA01
15 3 1700 13 2300 16 Standard plug terminal 1 0.0 1 Each 1 5 0 2 . . LA01
16 1 LA01 8 B100 17 Base assembly 1 0.0 1 Each 1 3 0 0 . . LA01
17 2 B100 17 1100 18 Finished shaft 1 0.0 1 Each 2 5 0 0 . . LA01
18 3 1100 18 2100 19 3/8 Steel tubing 26 0.2 26 Inches 3 8 0 0 . . LA01
19 2 B100 17 1200 20 6-Diameter steel plate 1 0.0 1 Each 3 6 0 0 . . LA01
20 2 B100 17 1300 21 Hub 1 0.0 1 Each 2 5 1 1 . . LA01
21 2 B100 17 1400 22 1/4-20 Screw 4 0.0 4 Each 1 4 3 3 . . LA01
22 1 LA01 8 S100 23 Black shade 1 0.0 1 Each 2 4 0 0 . . LA01