How to deal with comma in description when using TRANSFORM_FILE to read CSV file?

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
eddie9394
Posts: 23
Joined: Tue Aug 14, 2018 11:03 pm

How to deal with comma in description when using TRANSFORM_FILE to read CSV file?

Post by eddie9394 »

I am using the TRANSFORM_FILE to read a CSV file into a list, it works fine most of the time, but when there is a comma in the description field, it will shift everything off, I try to double-quote the description field and it is not working. Is there any way to deal with this issue?
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: How to deal with comma in description when using TRANSFORM_FILE to read CSV file?

Post by atostaine »

If there are double quotes around the description with the comma then it should work. If you are sure you have "description, and a comma" then something else is wrong.
Art Tostaine
eddie9394
Posts: 23
Joined: Tue Aug 14, 2018 11:03 pm

Re: How to deal with comma in description when using TRANSFORM_FILE to read CSV file?

Post by eddie9394 »

Thanks for the help!

Yes, I did have double quotes around the description. Please refer to the uploaded screen snip.

You suggested something else is wrong, where should I start the search?! :idea: :?:
Attachments
Annotation 2019-10-24 120057.jpg
Annotation 2019-10-24 120057.jpg (102.34 KiB) Viewed 5764 times
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: How to deal with comma in description when using TRANSFORM_FILE to read CSV file?

Post by atostaine »

My test is doing that also. Looks like a bug in transform_file. Whenever I import CSV's using IBM i or Excel the double quote is valid.
Untitled.png
Untitled.png (4.12 KiB) Viewed 5763 times
Art Tostaine
Post Reply