To drill into nested levels, it is easlest to use recursion.
- Write one program to process the initial product list, Prog1. For each product in the list, call Prog2.
- Write a simple program, Prog2, to do the work for one level of the bill of materials.
- In Prog2, when a parent is found, call Prog2 again to do the work for that level.
- Pass the product in and the quantity out as parms.
- On the program H-spec, use DftActGrp(*no) ActGrp(*new).
- Set on *INLR when exiting Prog2 so that file-opens will be cleaned up.