Bill-of-Material Postprocessing Macros |
%BOMRSUB: Summarized Bill of Material |
%bomrsub ( |
ROOT=root, IN=SAS-data-set, LEV=variable, PARENT=variable, |
COMP=variable, QUANTITY=variable, QTYPROD=variable, |
|
RID=variables, QTYREQ=qtyreq, REQ=req, |
|
OUT=SAS-data-set, DROP=variables); |
specifies the part number of the item for which the summarized bill of material 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.
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.
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.
identifies the variable in the Indented BOM data set that contains the parent item’s part number. A null value tells the macro program not to look for the variable in the input data set that contains the parent item’s part number. The default value is _Parent_.
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.
identifies the variable in the Indented BOM data set that contains the quantity per assembly information. A null value tells the macro program not to look for the variable in the input data set that contains the quantity per assembly information. The default value is Qty_Per.
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 is replaced by the default value.
identifies variables in the Indented BOM data set that contain product structure information and are not specified in the PARENT=, COMP=, or QUANTITY= parameters. These variables are only needed in creating the default drop variables. If you do not specify this parameter or specify a null value, the macro program assumes the Indented BOM data set contains no RID variables.
specifies the name for the variable in the output data set that contains the quantity of the item identified by the Component variable that is used to make units of the item Root, where is the value specified in the REQ= parameter. The default value is Qty_Req. A null value is replaced by the default value. The Indented BOM data set should not contain any variables with the name specified by the QTYREQ= parameter. Otherwise, the values of the variable with the name specified in the QTYREQ= parameter will be overwritten.
specifies the quantity required for the item Root. The default value is . A null value is replaced by the default value.
names the output data set that contains summarized bill of material data. The default value is _BOMOUT_. A null value is replaced by this default value.
identifies 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 list that contains the variables specified in the LEV=, PARENT=, QUANTITY=, QTYPROD=, and RID= parameters, in addition to the Paren_ID, Part_ID, _Prod_, Tot_Lead, and Tot_Off variables, if they are in the Indented BOM data set. 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 Input Data Sets.
The following parameters specify the variables in the input data set that are required by the %BOMRSUB macro.
A character or numeric variable that contains the part number of the component.
A numeric variable that contains the indenture level information.
A numeric variable that contains the quantity per product 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.
A character or numeric variable that contains the part number of the parent item. The type of this variable must be the same as that of the variable specified in the COMP= parameter.
A numeric variable that contains the quantity per assembly information.
Variables that contain product structure information, except for those specified in the PARENT=, COMP=, or QUANTITY= parameters. These variables are only needed in creating the default drop variables.
Variables that you do not want to be included in the output data set.
The output data set contains the summarized bill of material for the item Root. This data set has the same variables as the Indented BOM data set, except for those variables specified in the DROP= parameter. The output data set contains a new variable with the name specified by the following parameter:
A numeric variable that contains the quantity of the component identified by the Component variable that is used to produce units of the item Root, where is the value specified in the REQ= parameter.
Upon completion, this macro defines a macro variable, _BOMRSUB_, which contains a character string that indicates the status of the macro execution. See Macro Variables for the possible values of this macro variable.
The following statement constructs a summarized bill of material for the item 'LA01' from the Indented BOM data set displayed in Figure 4.1.
%bomrsub(root='LA01', in=IndBOM, quantity=QtyPer, qtyreq=QtyReq, rid=SDate EDate LTOff Fscrap, req=50, out=BomOut5);
The summarized bill of material for the item 'LA01' is displayed in Figure 4.6. Note that a summarized bill of material lists a component only once for the total quantity used. For example, the total quantity of units of the item '1400' comes from units that are for making units of 'B100', and units that are for producing units of '1500'.
ABC Lamp Company |
%BOMRSUB macro |
Summarized Bill of Material, Part LA01: Requirement=50 |
_Part_ | Desc | Unit | LeadTime | QtyReq |
---|---|---|---|---|
1100 | Finished shaft | Each | 2 | 50 |
1200 | 6-Diameter steel plate | Each | 3 | 50 |
1300 | Hub | Each | 2 | 50 |
1400 | 1/4-20 Screw | Each | 1 | 300 |
1500 | Steel holder | Each | 2 | 50 |
1600 | One-way socket | Each | 2 | 50 |
1700 | Wiring assembly | Each | 1 | 50 |
2100 | 3/8 Steel tubing | Inches | 3 | 1300 |
2200 | 16-Gauge lamp cord | Feet | 2 | 600 |
2210 | 14-Gauge lamp cord | Feet | 2 | 600 |
2300 | Standard plug terminal | Each | 1 | 50 |
A100 | One-way socket assem. | Each | 1 | 50 |
B100 | Base assembly | Each | 1 | 50 |
S100 | Black shade | Each | 2 | 50 |
Copyright © SAS Institute, Inc. All Rights Reserved.