Data Sources: Non-partitioned Oracle tables, along with their relevant columns are listed below
Code: Select all
ORDERS table: ORDER_NUM(PK1), ITEM_NUM(PK2), CUST_NUM, QTY_ORDERED
INVENTORY table: WHSE_NUM(PK1), ITEM_NUM(PK2), QTY_ONHAND
1. Read one row at a time from "Orders table".
2. Read "Inventory table" to select warehouses stocking ordered-item. Calculate "warehouse rank"(Rank depends on business rules and is used to prioritize between warehouses).
3. Update "Inventory table" to decrement QTY_ONHAND for the ordered-item at the warehouse.
4. Write to an output "Fulfillment file", following columns ... ORDER_NUM, ITEM_NUM and WHSE_NUM (which will be fulfilling the order).
Repeat steps 1 thru 4, till all the order have been processed.
Current state: Over the years, volume of orders has increased and Oracle server has become overloaded, consequently the above mentioned job is taking longer to run. We are planning to translate existing logic from Oracle to DataStage to take advantage of parallelism and newer/faster hardware.
Issue:In Oracle package, it is possible to perform selects and subsequent updates to "Inventory" and "Orders" table serially, thereby not double-dipping into same inventory held at a warehouse. However we are not sure, how to do this for an DataStage EE job.
Please advise.