Bill-of-Material Post-Processing Macros |
%BOMRMLW: Indented Where-Used List
%bomrmlw ( | ROOT=root, IN=SAS-data-set, LEV=variable, COMP=variable, |
| QTYPROD=variable, QTYUSED=qtyused, OUT=SAS-data-set, |
| DROP=variables); |
constructs an indented where-used list for a given item referred
to as the item Root, which lists
every parent item of the item Root and the respective quantities
required, as well
as each of their respective parent items, continuing until the
end item is referenced (Cox and Blackstone, J. H., Jr. 1998).
The parameters for this macro are as follows:
- ROOT=root
- specifies the part number of the item
for which the indented where-used list is constructed.
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 also referred to as the Component variable.
The default value is _Part_.
A null value is replaced by the default value.
- QTYPROD=variable
- identifies the variable in the Indented
BOM data set that contains the quantity per product information.
The default value is Qty_Prod.
A null value tells the macro program not to look for the variable
in the input data set that contains the quantity per product information.
- QTYUSED=qtyused
- specifies the name for the variable
in the output data set that contains the quantity of the item
Root used by the item identified by the Component variable.
A null value tells the macro program not to calculate and write
the quantity-used information to the output data set.
The default value is Qty_Used.
The specification of the QTYUSED= parameter is ignored if the macro
program cannot find the variable in the Indented BOM data set that
contains the quantity per product information.
The Indented BOM data set should not contain a variable with
the name specified in the QTYUSED= parameter. Otherwise, the values
of the variable with the name specified in the QTYUSED= parameter
will be overwritten.
- OUT=SAS-data-set
- names the output data set that contains
indented where-used list data for the item Root.
The default value is _BOMOUT_.
The null value is replaced by the default value.
- DROP=variables
- specifies all variables in the Indented
BOM data set that you do not want to be included in the output
data set. You can list the variables in any form that SAS allows.
The default value is the variable
that is specified in the QTYPROD= parameter.
A null value tells the macro program to write all the
variables in the Indented BOM data set to the output data set.
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 %BOMRMLW 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 following parameters specify the variables in the Indented BOM
input data set that are used by the macro, if they can be found in
the data set.
- QTYPROD=
- A numeric variable that contains the quantity per product
information.
- DROP=
- Variables that you do not want to be included in the
output data set.
The output data set contains the indented where-used list for the item
Root. This data set has the same variables
as the Indented BOM data set, except for
those variables that are specified in the DROP= parameter. If both values
for QTYPROD= and QTYUSED= parameters are not null,
the output data set contains a new variable with the name specified
by the following parameter:
- QTYUSED=
- A numeric variable that contains the quantity of the item
Root that is used in the item identified by the Component variable.
Upon completion, this macro defines a macro variable, _BOMRMLW_,
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.
The following statement constructs an indented where-used list for the item
'1400' from the Indented BOM data set displayed in Figure 3.1.
%bomrmlw(root='1400', in=IndBOM, qtyused=QtyUsed,
out=BomOut2, drop=Paren_ID Part_ID Qty_Prod);
The indented where-used list for the item '1400' is displayed
in Figure 3.3. In this list, the variable QtyUsed
contains the quantity of the item '1400' that
is used in the item identified by the variable _Part_.
For example, if you trace back from the item '1400' up to the
end item 'A101', you will observe that the item '1500' uses
2 units of '1400', and the item 'A101' uses 1 unit of
'1500', and hence, 2 units of '1400'. Therefore,
the value for the variable QtyUsed is 2 on both observations
2 and 3.
2 |
1500 |
1400 |
1/4-20 Screw |
2 |
0 |
. |
Each |
1 |
4 |
0 |
0 |
. |
. |
A101 |
1 |
A101 |
1500 |
Steel holder |
1 |
0 |
2 |
Each |
2 |
3 |
0 |
0 |
. |
. |
A101 |
0 |
|
A101 |
Three-way socket assem. |
. |
. |
2 |
Each |
1 |
1 |
. |
0 |
. |
. |
A101 |
3 |
1500 |
1400 |
1/4-20 Screw |
2 |
0 |
. |
Each |
1 |
6 |
0 |
2 |
. |
. |
LA01 |
2 |
A100 |
1500 |
Steel holder |
1 |
0 |
2 |
Each |
2 |
5 |
0 |
2 |
. |
. |
LA01 |
1 |
LA01 |
A100 |
One-way socket assem. |
1 |
0 |
2 |
Each |
1 |
3 |
2 |
2 |
. |
. |
LA01 |
0 |
|
LA01 |
Lamp LA |
. |
. |
2 |
Each |
2 |
2 |
. |
0 |
. |
. |
LA01 |
2 |
B100 |
1400 |
1/4-20 Screw |
4 |
0 |
. |
Each |
1 |
4 |
3 |
3 |
. |
. |
LA01 |
1 |
LA01 |
B100 |
Base assembly |
1 |
0 |
4 |
Each |
1 |
3 |
0 |
0 |
. |
. |
LA01 |
0 |
|
LA01 |
Lamp LA |
. |
. |
4 |
Each |
2 |
2 |
. |
0 |
. |
. |
LA01 |
|
Figure 3.3: Indented Where-Used List for Item 1400 (BomOut2)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.