My client receives an item master file from GHX and they use it to update the Item Master (IC11) & Vendor Item (PO13) records, to update unreleased Requition line items (RQ10), and to update pending PO Interface line items (PO23).
We will update the description values, manufacture values, and vendor item number values for the items in the file. We are also updating the GL account on IC11 and the Purchasing Major and Minor Class values from another file.
The value joining the two files is the UNSPSC code value.
I used a File Access to load each file, and the first was a combination of line and tab separated values. Each item was separated by line but each data element of the item was separated by tab stops. It was recommended that I use a DataIterator to first parse the lines and then to parse the tab separated data elements (basically a nested pair of DI's).
If you're familiar with this, it works pretty much like a query to cycle through the data elements and I thought that was a bit clumsy.
Remember, I had two files that I need to merge via UNSPSC codes before I could begin my updates in Lawson. One file had this value separated by the 4 parts while the other lumped them together.
This process, reading through 49k lines, parsing and rewriting the output to a new variable took less than 4 minutes. That comes out to better than 200 lines of data per second. Remember, it had to iterate each record by line and then each line by its data element.
Then for each set of Lawson records to be updated I used a SQL query to retrieve my item records and wrote that to a new variable, which I then compared to the merged data to determine which had to be updated.
Now I had, for example, a list of items that needed updates done on IC11 in Lawson. That's where the DataIterator now came into play. I could iterate this final output by line and then create a transaction expression to use in an AGS update.
Using the DI at this point made sense since I needed to perform an update after each item record was parsed out. Within the DI loop was an Assign and a Lawson Transaction.