# read a file

**URL:** <https://techcommunity.softwareag.com/t/read-a-file/175238>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [March 24, 2014, 7:52am UTC](https://techcommunity.softwareag.com/t/read-a-file/175238 "2014-03-24T07:52:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohit\_Tomar](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rohit_tomar/32/840_2.png) [@Rohit\_Tomar](https://techcommunity.softwareag.com/u/Rohit_Tomar)\
**Post date:** [March 24, 2014, 7:52am UTC](https://techcommunity.softwareag.com/t/read-a-file/175238/1 "2014-03-24T07:52:58Z")

</div>

hello  
please tell me how we can read a file and insert the data in the database…please help me out

---

<div class="post-metadata">

**Author:** ![Mahesh\_K\_Sreenivas](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/mahesh_k_sreenivas/32/299_2.png) [@Mahesh\_K\_Sreenivas](https://techcommunity.softwareag.com/u/Mahesh_K_Sreenivas)\
**Post date:** [March 24, 2014, 8:00am UTC](https://techcommunity.softwareag.com/t/read-a-file/175238/2 "2014-03-24T08:00:07Z")

</div>

Hello,  
Can you specify file type?

FF, XML??

---

<div class="post-metadata">

**Author:** ![Rohit\_Tomar](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rohit_tomar/32/840_2.png) [@Rohit\_Tomar](https://techcommunity.softwareag.com/u/Rohit_Tomar)\
**Post date:** [March 24, 2014, 8:01am UTC](https://techcommunity.softwareag.com/t/read-a-file/175238/3 "2014-03-24T08:01:38Z")

</div>

FF and Xml both

---

<div class="post-metadata">

**Author:** ![Mahesh\_K\_Sreenivas](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/mahesh_k_sreenivas/32/299_2.png) [@Mahesh\_K\_Sreenivas](https://techcommunity.softwareag.com/u/Mahesh_K_Sreenivas)\
**Post date:** [March 24, 2014, 8:09am UTC](https://techcommunity.softwareag.com/t/read-a-file/175238/4 "2014-03-24T08:09:55Z")

</div>

For FF your code should look something like this;

pub.file: getFile  
pub.flatFile:convertToValues  
Batch Insert Adapter Service

For XML almost similar but use the built in XML services in WmPublic XML services instead of flatFile services.

Have a look at this:

[http://www.idnxchange.com/blog/webmethods-step-by-step-flat-file-to-database.html](http://www.idnxchange.com/blog/webmethods-step-by-step-flat-file-to-database.html)

-HTH

Let me know if you have questions.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:30pm UTC](https://techcommunity.softwareag.com/t/read-a-file/175238/5 "2021-04-02T15:30:38Z")

</div>


