I have a need to store data such as this in a text file:
¯-a}vˆ—íU±/ƒ*Á0’…ÜÈ
When I was writing it to a text file I was using the EXPORT function and it was adding quotes around my value like so:
"¯-a}vˆ—íU±/ƒ*Á0’…ÜÈ"
so I switched to the PUT UNFORMATTED function to do it and the quotes went away.
My problem though is when I try to read the file, I'm doing it like so:
REPEAT:
IMPORT UNFORMAT allFileData.
allFileData = allFileData + newLine.
END.
INPUT CLOSE.
However, it won't read that line of data and I think it's because it has a character in it that looks like a quote (the ’ value).
I verified this by just trying to put the string into a character variable and use it and it won't work. It gives me a "unmatched quote found in procedure" error.
So my question is two fold. Is PUT UNFORMATTED the best way to write the data to a file so that the extra quotes aren't added? And is there a good way to properly get the data back out of that file in code?
¯-a}vˆ—íU±/ƒ*Á0’…ÜÈ
When I was writing it to a text file I was using the EXPORT function and it was adding quotes around my value like so:
"¯-a}vˆ—íU±/ƒ*Á0’…ÜÈ"
so I switched to the PUT UNFORMATTED function to do it and the quotes went away.
My problem though is when I try to read the file, I'm doing it like so:
REPEAT:
IMPORT UNFORMAT allFileData.
allFileData = allFileData + newLine.
END.
INPUT CLOSE.
However, it won't read that line of data and I think it's because it has a character in it that looks like a quote (the ’ value).
I verified this by just trying to put the string into a character variable and use it and it won't work. It gives me a "unmatched quote found in procedure" error.
So my question is two fold. Is PUT UNFORMATTED the best way to write the data to a file so that the extra quotes aren't added? And is there a good way to properly get the data back out of that file in code?