JDBC Insert notification

hi everybody ,
i am new to this forum ,firstly i wanna say hi and hello to all webMethods experts and developers.
the question i have is ,
i am creating a insert notification on a sql table , where in the service i need to invoke on the insert should create a batch flat file. can anybody give me steps or algos for doing this specific task.
any inputs and help is appreciated.
thanks
srikanth

Could you elaborate your requirement?

inserting multiple time, use of batch file is no clear

i have two requirements ,

  1. i get a flat file which is a batch file ,so a single file will contain multiple files in it. can u explain me how can i process a batch file and put it in the sql database.i have created the flat file schema and flatfileDT .and i am confused on what parameter i can loop to get the data of a individual file on every iteration.
  2. i have to take the data back from the sql database and send it back as a batch file which contains multiple records .i.e the insert notification acts on the table and inserts it in the dummy table , from where i have to take all the rows at a time and create a flat file.

Srikanth,

Looks like there are 2 integrations here:

  1. Flat file to table and
  2. Table to Flat File

For 1, create a flat file schema thats in line with the file
Load the contents and parse using the schema
Create an insert/update service on a JDBC adapter to insert data into a table
Map the contents of flat file into input of the adapter services and invoke them.
This will load data into the table.

For 2, create a notification on source table (Insert/Update/basic depending on requirement). This creates a pub’able document
Create a trigger between the publishable doc and a processing service
In the service, map the contents of notification and write the data to a flat file. You would have to create a flat file schema for the target file.

Hope this helps. Consult the pub-sub guide and flat file schema developers’ guide for detailed explanation

Regards,
Hara

thanks for the reply hara,
actually my first question is ,i have a incoming batch flatfile i.e the file which i get will have something like this
rec1 rec2 rec3 rec4 rec1 rec2 rec3 rec4 rec1 rec2 rec3 rec4 …
so i created a document type which contains the 4 reclists.
rec1(Doclist)
rec2(Doclist)
rec3(Doclist)
rec4(Doclist)
so i have done this and ,when i convert to values all the data will be in the reclists of dT ,so now i need to get data from each one ,i.e if i process a loop once i should get data from rec1 rec2 rec3 rec4 of first seq and then next and so on …
can u tell me how to do this on a doc which contains document lists inside .
hope u got the scenario
thanks
srikanth

So, will each line have the pattern repeating?

In that case you would have to specify a line separator in your flat file schema definition so that they are all loaded and looped through