Hello, I need to create a CSV pipe delimited file, including header rows, with no spaces for missing fields, from a SAS dataset. I used proc export and almost everything in the CSV file was correct except for a few records. The original data has a few records where the text term has quotation marks. Example: Study Country Record Visitname Page Term 001 US 00123B6 Baseline MEDICAL PROBLEM STOMACH 001 US 00123B7 Visit 1 MEDICAL PROBLEM "HEAD" and the CSV file is getting incorrectly output to look like this: Study|Country|Record|Visitname|Page|Term 001|USA|00123B6|Baseline||MEDICAL PROBLEM STOMACH 001|USA|00123B7|Visit 1||"MEDICAL PROBLEM ""HEAD""" where everything is correct except for the additional quotes surrounding the term field. Is there a way that proc export can output the data to look like this? --As it is originally. Study|Country|Record|Visitname|Page|Term 001|USA|00123B6|Baseline||MEDICAL PROBLEM STOMACH 001|USA|00123B7|Visit 1||MEDICAL PROBLEM "HEAD" I've also tried using both ods as well as a file csv statement with specifying a delimiter but have not found the right comination of statements. In these cases, the header row did not output and an additional space was added for missing fields (this was the file csv where I used a data _null_ and put(all) statement ) or the delimiter didn't work properly and every field was put in quotations (used an options (delimiter= '|') in the ods statement. Any suggestions greatly appreciated. Thank you!
... View more