.TH explode "" "" "/rdb Command" .PC "Produce table of subparts and their count for a part" \fBexplode \fIPart Amount \fB[ \fItable \fB]\fR .PP .II "table^explode part" .II "explode part into subparts" The command .B explode takes a part number or name and looks it up in a part table to find all of its subparts. It then finds the subparts of those subparts, and so forth, until it can seek no farther. .B explode also multiplies the number of parts times the subpart counts at each interaction, so the final subpart table lists all of the subparts of the original part and the total number of subparts needed to make the part. .PP You can use .B explode to generate a list of all items needed to make a product. The cost of these subparts, times the count, gives the value that can be totaled to arrive at the total cost of the product. .PP .B explode assumes that the .BR Part , .BR Subpart , and .B Count columns are the first three columns of the table, and that the third column is actually named .BR Count . .SH Example If you had a .B parttable, like this: .DM Part Subpart Count ---- ------- ------ 10001 10010 3 10001 10020 4 10010 10100 2 10020 10100 5 .DE .PP and you wanted to find the subpart list and count for two part 10001s, you would type: .DM explode 10001 2 .DE .PP The result would be: .DM Part Amount ---- ------ 10001 2 10010 6 10020 8 10100 52 .DE .PP Note that both 10010 and 10020 have 10100 as a subpart, but .B explode uses .B subtotal to combine the 10100 subparts into one row. The table is also sorted. .SH "See Also" .B bom, subtotal .R .SO explode