# Flat file with single quotes in around fields

**URL:** <https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [April 6, 2004, 12:56am UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691 "2004-04-06T00:56:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![erustomji](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@erustomji](https://techcommunity.softwareag.com/u/erustomji)\
**Post date:** [April 6, 2004, 12:56am UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/1 "2004-04-06T00:56:54Z")

</div>

Hello, I have a flat file like this:  
‘Order’,1,‘Order Description, for Tommy’,‘5’

How do I define my schema such that it takes the string in ’ ', but outputs only the content, i.e. ouput should be  
Order = Order  
Number = 1  
Description = Order Description, for Tommy  
Quantity = 5

Please help!  
Thanks

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [April 6, 2004, 1:04am UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/2 "2004-04-06T01:04:41Z")

</div>

In the FlatFile Schema Editor specify Under Field or Composite section-- Character string = ’

HTH,

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [April 6, 2004, 1:07am UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/3 "2004-04-06T01:07:54Z")

</div>

Erric,  
Ignore my posting,since it won’t work as per your requirement.

---

<div class="post-metadata">

**Author:** ![chris.14558](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@chris.14558](https://techcommunity.softwareag.com/u/chris.14558)\
**Post date:** [April 6, 2004, 2:57am UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/4 "2004-04-06T02:57:09Z")

</div>

Eric,

I do not believe there is any way to accomplish your goal via the flat file schema. However, to accomplish the same thing, why not just pass all of your flat file data into the pub.string:replace built-in service, and specify ’ as your searchString and leave the replaceString empty? And if there are some apostrophes in the data that you want to keep, then you could call the replace service on a field by field basis after performing the convertToValues.

HTH

---

<div class="post-metadata">

**Author:** ![erustomji](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@erustomji](https://techcommunity.softwareag.com/u/erustomji)\
**Post date:** [April 8, 2004, 1:45am UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/5 "2004-04-08T01:45:17Z")

</div>

Thanks to all for responding, however I replaced the ’ with blank for fields in the file prior to processing and it works.

---

<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:** [April 13, 2004, 7:50am UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/6 "2004-04-13T07:50:41Z")

</div>

BTW … replacing ’ with blank will not work as

‘Order’,1,‘Order Description, for Tommy’,‘5’

Order Description  
for tommy

will become two seperate fields  
I think we just need to replace ‘, or ,’ with ,

cheerz

---

<div class="post-metadata">

**Author:** ![chris.14558](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@chris.14558](https://techcommunity.softwareag.com/u/chris.14558)\
**Post date:** [April 13, 2004, 7:20pm UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/7 "2004-04-13T19:20:19Z")

</div>

Yeah, I saw that too Terry, but I was betting that:

```
'Order',1,'Order Description, for Tommy','5'
```

is really supposed to look like:

```
'Order',1,'Order Description for Tommy','5'
```

It sounds like he got things working though.

---

<div class="post-metadata">

**Author:** ![erustomji](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@erustomji](https://techcommunity.softwareag.com/u/erustomji)\
**Post date:** [April 14, 2004, 8:45pm UTC](https://techcommunity.softwareag.com/t/flat-file-with-single-quotes-in-around-fields/107691/8 "2004-04-14T20:45:35Z")

</div>

Yes, I replaced ‘, and ,’ with | and it worked.  
Thanks for responding.

---

<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/flat-file-with-single-quotes-in-around-fields/107691/9 "2021-04-02T15:04:53Z")

</div>


