If you set the Max Repeat attribute of the record definition in your flat file schema to “unlimited”, the pub.flatFile:convertToValues service will return a documentList containing an entry for each record in your flat file.
Use the LOOP statement to process each document in the documentList. In a sequence inside the loop, use a JDBC adapter insert or update service to add each document to the database. Commit the transaction after your LOOP statement if you are using XA transaction management functionality.
If terms like documentList, loop and sequence are unfamiliar to you (at least in a webMethods context), I would encourage you to work through the examples in the WmSamples package.
HTH,
Mark
#webMethods#Integration-Server-and-ESB#edi