8.2c - can I export unquoted tab-delimited?

65bit

New Member
Hi,

I have a need to export unquoted tab-delimited data. I can export qutoed tab-delimited or put unquoted non-delimited, but not sure how to do both.

I've been away from Progress for awhile and it seems there used to be some utility to strip / remove quotes after the fact. While not as elegant as not putting them there in the first place, I'm open to that if that's the only direction to go. :)

Any suggestions?

Thanks,
David
 

sphipp

Member
I'd tend to use PUT UNFORMATTED, but you would need to code a delimiter after each field.

PUT UNFORMATTED table.field1 "~t" table.field2 "~t" table.field3 "~t" ... SKIP.

I suppose you could use EXPORT DELIMITER "~t" to export to a file and then replace all quotes with blanks. You could do this in progress quite easily:
  • Output to a file.
  • Produce normal output using EXPORT DELIMITER "~t"
  • Close the file
  • INPUT FROM the file.
  • OUTPUT to another file.
  • Read each line into a string (IMPORT UNFORMATTED cline)
  • Clear the quotes and output the line - PUT UNFORMATTED REPLACE (cline,"""","") SKIP.
  • OUTPUT CLOSE.
but it's a bit messy and PUT UNFORMATTED is probably easier, although it does require each field to be included in the PUT statement.
 

65bit

New Member
Sorry - I thought I had said "thanks" for your suggestion, but looks like I didn't hit submit.

Thanks much for your help. Adding the delimiter to each field worked great.

David
 
Top