|
ROOT=root, SAMEAS=sameas, EXCEPT=except, |
REPBY=repby, IN=SAS-data-set, PMDATA=SAS-data-set, |
|
PART=variable, LEV=variable, PARENT=variable, |
|
PARENID=variable, COMP=variable, QUANTITY=variable, |
|
OFFSET=variable, FACTOR=variable, LEADTIME=variable, |
|
ID=variables, RID=variables, OUT=SAS-data-set); |
performs the same-as-except transaction, which creates a new indented bill of material for the item specified in the ROOT= parameter (referred to as the item Root), which is a clone of the bill of material for the item specified in the SAMEAS= parameter (referred to as the item Sameas). Then, it replaces the item specified in the EXCEPT= parameter (referred to as the item Except) with the item specified in the REPBY= parameter (referred to as the item Repby) in the newly created bill of material. Note that, unlike other transactional macros, the output data set of this macro contains the new bill of material for the item Root only. In addition, if the item Root is in the Indented BOM input data set, the bill of material for the item Root in the input data set may be different from the one in the output data set. The parameters for this macro are as follows:
The input data sets of this macro are the Indented BOM and the Part Master data sets described in Input Data Sets. The Indented BOM data set contains the bill of material for all end items of the product line, plant, or company.
The following parameters specify the variables the Indented BOM data set that are required by the %BOMTSAE
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 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.
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 scrap factor information.
Variables that contain part master information, except for those specified in the COMP= or LEADTIME= parameters.
A numeric variable that contains the lead time of the component.
A numeric variable that contains the lead-time offset information.
A numeric variable that contains the quantity per assembly information.
Variables that contain product structure information, except for those specified in the COMP=, FACTOR=, OFFSET=, PARENT=, or QUANTITY= parameters.
Unlike other transactional macros, the item Root is not necessarily defined in the Indented BOM input data set. If it is not, you must specify a Part Master data set in the PMDATA= parameter that contains the part master record for the item Root. Otherwise, you can use the Indented BOM data set as the Part Master data set. The Part Master input data set may contain one part master record for the item Root only, or contain the part master records for all items, including the item Root, that are used in the company’s product structure.
The following parameter specifies the variable in the Part Master data set that is required by the %BOMTSAE
macro.
A character or numeric variable that contains the part number of the item. The type of this variable must be the same as that of the variable specified in the COMP= parameter.
The following parameters specify the variables in the Product Structure input data set that are used by the macro, if they can be found in the data set.
Variables that contain part master information, except for those specified in the PART= or LEADTIME= parameters.
A numeric variable that contains the lead time of the component.
The output data set of this macro contains the bill of material for the item Root, which is a clone of the bill of material for the item Sameas, except the item Except, which is replaced by the item Repby in all its uses. The output data set has the same variables as the Indented BOM output data set of the BOM procedure. See Indented BOM Data Set in Chapter 3 for the variables in this data set. Note that if the item Root is in the Indented BOM data set specified by the IN= parameter, the bill of material for the item Root in the input data set may be different from the one in this output data set.
Upon completion, this macro defines a macro variable, _BOMTSAE_
, which contains a character string that indicates the status of the macro execution. See Macro Variables for the possible values of this macro variable.
In this example, the engineers of the ABC Lamp Company need to create a new product, a lamp with three-way socket (part number
'LA03
'), which is the same as the lamp 'LA01
' except that the new product has a three-way socket assembly (part number 'A101
'), instead of a one-way socket assembly (part number 'A100
'). They first create a part master record for the new product 'LA03
'. The Part Master input data set, PMaster1
, displayed in Figure 4.12, contains this part master record.
proc print data=PMaster1 noobs; title 'ABC Lamp Company'; title3 'Part Master Record; Part LA03'; run;
Figure 4.12: Part Master Record for Item LA03 (PMaster1)
ABC Lamp Company |
Part Master Record; Part LA03 |
Part | Desc | Unit | LeadTime |
---|---|---|---|
LA03 | Lamp LA w/ 3-way socket | Each | 2 |
The following SAS code invokes the %BOMTSAE
macro to perform the transaction.
%bomtsae(root='LA03', sameas='LA01', except='A100', repby='A101', in=IndBOM, pmdata=PMaster1, part=Part, quantity=QtyPer, offset=LTOff, factor=Fscrap, leadtime=LeadTime, id=Desc Unit, rid=SDate EDate, out=BomOut10);
The data set BomOut10
that contains the indented bill of material for the new item 'LA03
' is displayed in Figure 4.13.
Figure 4.13: Indented Bill of Material for Item LA03 (BomOut10)
ABC Lamp Company |
%BOMTSAE macro |
Indented Bill of Material, Part LA03 |
Obs | _Level_ | _Parent_ | Paren_ID | _Part_ | Part_ID | Desc | QtyPer | Fscrap | Qty_Prod | Unit | LeadTime | Tot_Lead | LTOff | Tot_Off | SDate | EDate | _Prod_ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | . | LA03 | 8 | Lamp LA w/ 3-way socket | . | . | 1 | Each | 2 | 2 | . | 0 | . | . | LA03 | |
2 | 1 | LA03 | 8 | A101 | 9 | Three-way socket assem. | 1 | 0.0 | 1 | Each | 1 | 3 | 2 | 2 | . | . | LA03 |
3 | 2 | A101 | 9 | 1500 | 10 | Steel holder | 1 | 0.0 | 1 | Each | 2 | 5 | 0 | 2 | . | . | LA03 |
4 | 3 | 1500 | 10 | 1400 | 11 | 1/4-20 Screw | 2 | 0.0 | 2 | Each | 1 | 6 | 0 | 2 | . | . | LA03 |
5 | 2 | A101 | 9 | 1601 | 12 | Three-way socket | 1 | 0.0 | 1 | Each | 2 | 5 | 0 | 2 | . | . | LA03 |
6 | 2 | A101 | 9 | 1700 | 13 | Wiring assembly | 1 | 0.0 | 1 | Each | 1 | 4 | 0 | 2 | . | . | LA03 |
7 | 3 | 1700 | 13 | 2200 | 14 | 16-Gauge lamp cord | 12 | 0.1 | 12 | Feet | 2 | 6 | 0 | 2 | . | 07APR2001 | LA03 |
8 | 3 | 1700 | 13 | 2210 | 15 | 14-Gauge lamp cord | 12 | 0.1 | 12 | Feet | 2 | 6 | 0 | 2 | 08APR2001 | . | LA03 |
9 | 3 | 1700 | 13 | 2300 | 16 | Standard plug terminal | 1 | 0.0 | 1 | Each | 1 | 5 | 0 | 2 | . | . | LA03 |
10 | 1 | LA03 | 8 | B100 | 17 | Base assembly | 1 | 0.0 | 1 | Each | 1 | 3 | 0 | 0 | . | . | LA03 |
11 | 2 | B100 | 17 | 1100 | 18 | Finished shaft | 1 | 0.0 | 1 | Each | 2 | 5 | 0 | 0 | . | . | LA03 |
12 | 3 | 1100 | 18 | 2100 | 19 | 3/8 Steel tubing | 26 | 0.2 | 26 | Inches | 3 | 8 | 0 | 0 | . | . | LA03 |
13 | 2 | B100 | 17 | 1200 | 20 | 6-Diameter steel plate | 1 | 0.0 | 1 | Each | 3 | 6 | 0 | 0 | . | . | LA03 |
14 | 2 | B100 | 17 | 1300 | 21 | Hub | 1 | 0.0 | 1 | Each | 2 | 5 | 1 | 1 | . | . | LA03 |
15 | 2 | B100 | 17 | 1400 | 22 | 1/4-20 Screw | 4 | 0.0 | 4 | Each | 1 | 4 | 3 | 3 | . | . | LA03 |
16 | 1 | LA03 | 8 | S100 | 23 | Black shade | 1 | 0.0 | 1 | Each | 2 | 4 | 0 | 0 | . | . | LA03 |