I have a program that takes in a delimited file then gets the Head then gets the item. The problem is when there are many different items it only gets the very last item and populates the db with that one item only and not each one that will begin on each "item" row.
WHEN "item" THEN
DO:
RUN getitem.
END.
the item is taken from the file and put in a temp table
temp_line.item = TRIM(position[03])
the the field is written with the value
my_rcv_ln.ITEM = string(temp_line.item)
how can this increment with each item there can be many?
are you sure you are creating a new record for each item that is being loaded?
If you create only one record outside of the loop, instead of a separate one for each item within the loop, then the symptom would be what you're describing...
Just a thought...