Bill of Material Postprocessing Macros


%BOMRMLB: Indented Bill of Material

%bomrmlb (

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

 

COMP=variable, QUANTITY=variable, QTYPROD=variable,

 

FACTOR=variable, LEADTIME=variable, TOTLEAD=variable,

 

OFFSET=variable, TOTOFF=variable, PARENID=variable,

 

PROD=variable, REQ=req, OUT=SAS-data-set, DROP=variables);

constructs an indented bill of material for a given item referred to as the item Root, which lists all components directly or indirectly used in the item Root. If a component is a subassembly, all its components and all their components are also listed, down to purchased items and raw materials. The parameters for this macro are as follows:

ROOT=root

specifies the part number of the item for which the indented 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.

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.

PARENT=variable

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_.

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.

QUANTITY=variable

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.

QTYPROD=variable

identifies the variable in the Indented BOM data set that contains the quantity per product information. 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. The default value is Qty_Prod.

FACTOR=variable

identifies the variable in the Indented BOM data set that contains the scrap factor information. A null value tells the macro program not to look for the variable in the input data set that contains the scrap factor information. The default value is S_Factor.

LEADTIME=variable

identifies the variable in the Indented BOM data set that contains the lead time information. If you do not specify this parameter or specify a null value, the macro program will not look for the variable in the input data set that contains the lead time information.

TOTLEAD=variable

identifies the variable in the Indented BOM data set that contains the total lead time information. A null value tells the macro program not to look for the variable in the input data set that contains the total lead time information. The default value is Tot_Lead. The specification of the TOTLEAD= parameter is ignored if the macro program cannot find the variable in the Indented BOM data set that contains the lead time information.

OFFSET=variable

identifies the variable in the Indented BOM data set that contains the lead-time offset information. A null value tells the macro program not to look for the variable in the input data set that contains the lead-time offset information. The default value is L_Offset.

TOTOFF=variable

identifies the variable in the Indented BOM data set that contains the total lead-time offset information. A null value tells the macro program not to look for the variable in the input data set that contains the total lead-time offset information. The default value is Tot_Off. The specification of the TOTOFF= parameter is ignored if the macro program cannot find the variable in the Indented BOM data set that contains the lead-time offset information.

PARENID=variable

identifies the variable in the Indented BOM data set that contains the ID number for the parent record. A null value tells the macro program not to look for the variable in the input data set that contains the ID number of the parent record. The default value is Paren_ID.

PROD=variable

identifies the variable in the Indented BOM data set that contains the end 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 end item’s part number. The default value is _Prod_.

REQ=req

specifies the quantity required for the item Root. The default value is 1. A null value is replaced by the default value.

OUT=SAS-data-set

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

DROP=variables

identifies all the 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. If you do not specify the DROP= parameter, or specify a null value, all variables in the Indented BOM data set are included in the output data set.

The Input Data Set

The input data set for 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 %BOMRMLB 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.

FACTOR=

A numeric variable that contains the scrap factor information.

LEADTIME=

A numeric variable that contains the lead time of the component.

OFFSET=

A numeric variable that contains the lead-time offset information.

PARENID=

A numeric variable that contains the ID number for the parent record.

PARENT=

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.

PROD=

A character or numeric variable that contains the part number of the end item. The type of this variable must be the same as that of the variable specified in the COMP= parameter.

QTYPROD=

A numeric variable that contains the quantity per product information.

QUANTITY=

A numeric variable that contains the quantity per assembly information.

TOTLEAD=

A numeric variable that contains the total lead time information.

TOTOFF=

A numeric variable that contains the total lead-time offset information.

DROP=

Variables that you do not want to be included in the output data set.

The Output Data Set

The output data set contains the indented bill of material for the item Root. This data set is a subset of the Indented BOM input data set, and has the same variables as the Indented BOM data set , except for the variables that are specified in the DROP= parameter. The quantity per product (the value of the variable specified in the QTYPROD= parameter) of each record in this data set reflects the quantity needed in producing m units of the item Root, where m is the value specified in the REQ= parameter.

Note that the first record of the output data set does not contain a parent-component relationship. Therefore, the values for all variables that contain product structure information in this record have to be missing. The %BOMRMLB macro sets the values for the variables that are specified in the PARENT=, QUANTITY=, FACTOR=, and OFFSET= parameters to a missing value. It also sets the value of the variable specified in the PARENID= parameter to a missing value since the first record does not have a parent record. If there are other variables that also contain product structure data, you must manually set the values for those variables in the first record. See Product Structure Data Set in Chapter 3 for the variables that contain product structure information.

Macro Variable _BOMRMLB_

Upon completion, this macro defines a macro variable, _BOMRMLB_, 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

The following statement constructs an indented bill of material for the item 'A100' from the Indented BOM data set displayed in Figure 4.1.

   %bomrmlb(root='A100', in=IndBOM, quantity=QtyPer,
            factor=Fscrap, leadtime=LeadTime, offset=LTOff,
            out=BomOut1, drop=Paren_ID Part_ID _Prod_);

The indented bill of material for the item 'A100' is displayed in Figure 4.2.

Figure 4.2: Indented Bill of Material for Item A100 (BomOut1)

ABC Lamp Company
%BOMRMLB macro
Indented Bill of Material, Part A100

_Level_ _Parent_ _Part_ Desc QtyPer Fscrap Qty_Prod Unit LeadTime Tot_Lead LTOff Tot_Off SDate EDate
0   A100 One-way socket assem. . . 1 Each 1 1 . 0 . .
1 A100 1500 Steel holder 1 0.0 1 Each 2 3 0 0 . .
2 1500 1400 1/4-20 Screw 2 0.0 2 Each 1 4 0 0 . .
1 A100 1600 One-way socket 1 0.0 1 Each 2 3 0 0 . .
1 A100 1700 Wiring assembly 1 0.0 1 Each 1 2 0 0 . .
2 1700 2200 16-Gauge lamp cord 12 0.1 12 Feet 2 4 0 0 . 07APR2001
2 1700 2210 14-Gauge lamp cord 12 0.1 12 Feet 2 4 0 0 08APR2001 .
2 1700 2300 Standard plug terminal 1 0.0 1 Each 1 3 0 0 . .