# Parsing Flat File

**URL:** <https://techcommunity.softwareag.com/t/parsing-flat-file/107451>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [October 28, 2004, 1:05am UTC](https://techcommunity.softwareag.com/t/parsing-flat-file/107451 "2004-10-28T01:05:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![braindrain](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@braindrain](https://techcommunity.softwareag.com/u/braindrain)\
**Post date:** [October 28, 2004, 1:05am UTC](https://techcommunity.softwareag.com/t/parsing-flat-file/107451/1 "2004-10-28T01:05:33Z")

</div>

Guys,  
I am parsing a csv file. The first row I have is column heading and then the data.

```
 I use format services for couple of couples to format the data. But, when I run the service, I am getting exception since the first row in the file is not data(Its column names). 

```

Do we need to delete the first row before sending the data file to webMethods?

Is there any way we can set in ffSchema to ignore the first row in the file?

```
Do we ahve any other approach to solve the issue. 

```

Thanks,  
Brain.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [October 28, 2004, 2:12am UTC](https://techcommunity.softwareag.com/t/parsing-flat-file/107451/2 "2004-10-28T02:12:34Z")

</div>

Hi Brain,

If Column names are fixed and consistent, you can avoid the formatting for the column names in the formatted service by putting a check condition for column names.After parsing the FlaFile into a document using FlatFile Schema, you can ignore the first record while processing the document.

Thanks  
Usha

---

<div class="post-metadata">

**Author:** ![Chris\_L](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@Chris\_L](https://techcommunity.softwareag.com/u/Chris_L)\
**Post date:** [October 28, 2004, 2:14am UTC](https://techcommunity.softwareag.com/t/parsing-flat-file/107451/3 "2004-10-28T02:14:12Z")

</div>

Try creating a record that describes the column headings and making the other records sub-records of that one.  
However, easiest solution is to have them removed before the file is sent.

I’m sure someone asked this before, try searching the history.

---

<div class="post-metadata">

**Author:** ![braindrain](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@braindrain](https://techcommunity.softwareag.com/u/braindrain)\
**Post date:** [October 28, 2004, 8:49pm UTC](https://techcommunity.softwareag.com/t/parsing-flat-file/107451/4 "2004-10-28T20:49:06Z")

</div>

Usha,  
We can do your approch but the only draw back is performance. The column names gets checked for each and every record/row and they are more than 15000 in each file. This would be a lot of over head I guess.

Chris,  
Can you further explian your approach.

Thanks,  
Brain.

---

<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:04pm UTC](https://techcommunity.softwareag.com/t/parsing-flat-file/107451/5 "2021-04-02T15:04:48Z")

</div>


