Bill-of-Material Post-Processing 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 bills of material.
The default value is _BOMOUT_.
A null value is replaced by the default value.
The input data set of this macro is the Indented BOM data set
described in the section "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 of this macro contains all the bills 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.
Upon completion, this macro defines a macro variable, _BOMTDEL_,
which contains a character string that indicates the status of the
macro execution. See the section "Macro Variables" for the possible values
of this macro variable.
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 3.1.
%bomtdel(root='2200', in=IndBOM, out=BomOut8);
The data set BomOut8 displayed in Figure 3.10 contains
the updated indented bills of material of the company.
Note that the item '2200' is
removed from both bills of material for the end items 'A101' and
'LA01'.
0 |
|
. |
A101 |
0 |
Three-way socket assem. |
. |
. |
1 |
Each |
1 |
1 |
. |
0 |
. |
. |
A101 |
1 |
A101 |
0 |
1500 |
1 |
Steel holder |
1 |
0.0 |
1 |
Each |
2 |
3 |
0 |
0 |
. |
. |
A101 |
2 |
1500 |
1 |
1400 |
2 |
1/4-20 Screw |
2 |
0.0 |
2 |
Each |
1 |
4 |
0 |
0 |
. |
. |
A101 |
1 |
A101 |
0 |
1601 |
3 |
Three-way socket |
1 |
0.0 |
1 |
Each |
2 |
3 |
0 |
0 |
. |
. |
A101 |
1 |
A101 |
0 |
1700 |
4 |
Wiring assembly |
1 |
0.0 |
1 |
Each |
1 |
2 |
0 |
0 |
. |
. |
A101 |
2 |
1700 |
4 |
2210 |
6 |
14-Gauge lamp cord |
12 |
0.1 |
12 |
Feet |
2 |
4 |
0 |
0 |
08APR2001 |
. |
A101 |
2 |
1700 |
4 |
2300 |
7 |
Standard plug terminal |
1 |
0.0 |
1 |
Each |
1 |
3 |
0 |
0 |
. |
. |
A101 |
0 |
|
. |
LA01 |
8 |
Lamp LA |
. |
. |
1 |
Each |
2 |
2 |
. |
0 |
. |
. |
LA01 |
1 |
LA01 |
8 |
A100 |
9 |
One-way socket assem. |
1 |
0.0 |
1 |
Each |
1 |
3 |
2 |
2 |
. |
. |
LA01 |
2 |
A100 |
9 |
1500 |
10 |
Steel holder |
1 |
0.0 |
1 |
Each |
2 |
5 |
0 |
2 |
. |
. |
LA01 |
3 |
1500 |
10 |
1400 |
11 |
1/4-20 Screw |
2 |
0.0 |
2 |
Each |
1 |
6 |
0 |
2 |
. |
. |
LA01 |
2 |
A100 |
9 |
1600 |
12 |
One-way socket |
1 |
0.0 |
1 |
Each |
2 |
5 |
0 |
2 |
. |
. |
LA01 |
2 |
A100 |
9 |
1700 |
13 |
Wiring assembly |
1 |
0.0 |
1 |
Each |
1 |
4 |
0 |
2 |
. |
. |
LA01 |
3 |
1700 |
13 |
2210 |
15 |
14-Gauge lamp cord |
12 |
0.1 |
12 |
Feet |
2 |
6 |
0 |
2 |
08APR2001 |
. |
LA01 |
3 |
1700 |
13 |
2300 |
16 |
Standard plug terminal |
1 |
0.0 |
1 |
Each |
1 |
5 |
0 |
2 |
. |
. |
LA01 |
1 |
LA01 |
8 |
B100 |
17 |
Base assembly |
1 |
0.0 |
1 |
Each |
1 |
3 |
0 |
0 |
. |
. |
LA01 |
2 |
B100 |
17 |
1100 |
18 |
Finished shaft |
1 |
0.0 |
1 |
Each |
2 |
5 |
0 |
0 |
. |
. |
LA01 |
3 |
1100 |
18 |
2100 |
19 |
3/8 Steel tubing |
26 |
0.2 |
26 |
Inches |
3 |
8 |
0 |
0 |
. |
. |
LA01 |
2 |
B100 |
17 |
1200 |
20 |
6-Diameter steel plate |
1 |
0.0 |
1 |
Each |
3 |
6 |
0 |
0 |
. |
. |
LA01 |
2 |
B100 |
17 |
1300 |
21 |
Hub |
1 |
0.0 |
1 |
Each |
2 |
5 |
1 |
1 |
. |
. |
LA01 |
2 |
B100 |
17 |
1400 |
22 |
1/4-20 Screw |
4 |
0.0 |
4 |
Each |
1 |
4 |
3 |
3 |
. |
. |
LA01 |
1 |
LA01 |
8 |
S100 |
23 |
Black shade |
1 |
0.0 |
1 |
Each |
2 |
4 |
0 |
0 |
. |
. |
LA01 |
|
Figure 3.10: Indented Bills of Material Updated by the Multiple-Delete Transaction (BomOut8)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.