cancel
Showing results for 
Search instead for 
Did you mean: 

Double quotes handling in file content conversion

abhay_aggarwal
Participant
0 Kudos

Hi ,

I am reading txt file using FCC

example:

"OP01","B","3230","400201","00520550220I","N32305IT2158","2017-03-09 00:00:00","2017-03-10 00:00:00","943 945 954 ","R15A310001","G(DX)+, TC(2V)+","","","","500,958","","","","","","","","0730"

I wanted to remove first double quotes " only . I have field separator ","

so can not remove double quotes " from rest of the part in string by using enclosureSignEsc parameter

Regards

Accepted Solutions (0)

Answers (5)

Answers (5)

abhay_aggarwal
Participant
0 Kudos

Hi Inaki,

We have PI server on AIX OS will this script work on AIX .

for 2nd option I cannot use point as separator as "," is coming in file from source as separator

Hi Manoj,

I tried to use begin field separator but it didn't worked

Regards

iaki_vila
Active Contributor
0 Kudos

Hi Abhay,

Are your OS a Linux?, you can use a OS system command "sed" to remove the first double quotes. This link explains an example, not equals than yours, but similar http://stackoverflow.com/questions/9733338/shell-script-remove-first-and-last-quote-from-a-variable

Another option would be to use the point as separator and skip the double quotes at mapping level.

Regards.

0 Kudos

Hi Abhay,

Check the below link

https://archive.sap.com/discussions/thread/1725047

Regards,

Manoj Kumar

abhay_aggarwal
Participant
0 Kudos

Hi Ryan,

My field separator is "," so cannot use , as separator it will mix all the column values if I will remove an enclosureSign of " ??

Regards,

Ryan-Crosby
Active Contributor
0 Kudos

Hi Abhay,

Why wouldn't you simply use a field separator of . and an enclosureSign of " ?? Setting up the FCC with those parameters would remove all . characters except those within the field content and then strip all " from the data unless you specify otherwise.

Regards,

Ryan Crosby