Bill-of-Material Postprocessing Macros |
%BOMRSLW: Single-Level Where-Used List |
%bomrslw ( |
ROOT=root, IN=SAS-data-set, PARENT=variable, |
COMP=variable, QUANTITY=variable, PARENID=variable, |
|
PARTID=variable, RID=variables, QTYUSED=qtyused, |
|
OUT=SAS-data-set, DROP=variables); |
specifies the part number of the item for which the single-level 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.
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 parent item’s part number. The default value is _Parent_. A null value is replaced by the default value.
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 of the corresponding macro variable is replaced by this default value in the macro program.
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 ID number for the parent record. The default value is Paren_ID. A null value is replaced by the default value.
identifies the variable in the Indented BOM data set that contains the ID number for the current record. The default value is Part_ID. A null value is replaced by the default value.
identifies variables in the Indented BOM data set that contain the product structure information, and are not specified in PARENT=, COMP=, or QUANTITY= parameters. 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 Root used by the parent 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 assembly information. The Indented BOM data set should not contain any variables with the name specified by the QTYUSED= parameter. Otherwise, the values of the variable with the name specified in the QTYUSED= parameter will be overwritten.
names the output data set that contains a single-level where-used list for the item Root. The default value is _BOMOUT_. A null value is replaced by this default value.
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 list that contains the variables specified in the COMP=, QUANTITY=, PARENID=, and PARTID= parameters; plus the _Level_, _Prod_, Qty_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 %BOMRSLW macro.
A character or numeric variable that contains the part number of the component.
A numeric variable that contains the ID number for the parent record.
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 ID number for the current record.
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 numeric variable that contains the quantity per assembly information.
Variables that contain product structure information, except for those specified in the COMP=, PARENT=, or QUANTITY= parameters.
Variables that you do not want to be included in the output data set.
The output data set contains the single-level where-used list for the item Root. This data set has the same variables as the Indented BOM data set, except for the variables specified in the DROP= parameter. If both values for the QUANTITY= and QTYUSED= parameters are not null, 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 item Root that is used in the parent item identified by the Component variable.
Upon completion, this macro defines a macro variable, _BOMRSLW_, 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 single-level where-used list for the item '1400' from the Indented BOM data set displayed in Figure 4.1.
%bomrslw(root='1400', in=IndBOM, quantity=QtyPer, rid=SDate EDate, qtyused=QtyUsed, out=BomOut4);
The single-level where-used list for the item '1400' is displayed in Figure 4.5.
Copyright © SAS Institute, Inc. All Rights Reserved.