Parsing multiple things

Posted by hermes on 02-Aug-2016 14:37

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
         RUN getitem.

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?

All Replies

Posted by smat-consulting on 02-Aug-2016 15:05

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...

This thread is closed