Page 1 of 1

Multiple Inserts on UDB For a Single Record

Posted: Thu Nov 03, 2005 1:17 pm
by Marley777
I have a situation where I am reading in a sequential file and for each record read I need to insert multiple rows in UDB database based on a match from the key in the sequential file.

i.e....

Read Seq file
Select from DB where DB.col1 = Seq File.col1
For each row returned insert new row in same table

What I am attempting to do is the COBOL equivalent of declaring a cursor and fetching the rows returned if that helps.

Thanks in advance.

Re: Multiple Inserts on UDB For a Single Record

Posted: Mon Nov 07, 2005 8:09 am
by sudarshan
Hey,

One simple way of achieving this is by using a lookup stage and putting the condition u have specified as the lookup condition and then dropping the lookup failures.

:)
Sudarshan