Date: Thu, 13 Sep 2007 13:20:39 -0400
Reply-To: Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject: Re: ODS CSV files
Content-Type: text/plain; charset="us-ascii"
Bad news and good news.
The bad news -- I just looked at the latest version of the CSV tagset,
and I don't see an option to suppress the double quotes.
The good news -- this is your opportunity to get into the wonderful
world of tagset editing. Take a look at one or more of Eric Gebhart's
papers, such as "The Beginners Guide to ODS MARKUP: Don't Panic!" (at
paper specifically discusses the CSV tagset, among others.
CAUTION #1 -- I am by no means an expert on this, but I believe this
This can be somewhat arcane, and many of the tagsets are quite
complicated. Fortunately, CSV is one of the simplest, and the change
you would need to make is also simple. There are a couple of places
within the latest version of ODS CSV that look like:
do /if cmp($type, "String");
Basically, "If this value is a string, put out a double quote." There's
one of these before and after the value itself is written.
So, just remove both of these, give the tagset a different name
(CSVNOQUOT, perhaps), and run PROC TEMPLATE. You will then need to use
ODS TAGSETS.CSVNOQUOT in your jobs to reference it.
CAUTION #2 -- You will get into trouble if you use this new tagset with
character string values that contain embedded commas.
From: firstname.lastname@example.org [mailto:email@example.com]
On Behalf Of Jerry Davis
Sent: Thursday, September 13, 2007 9:52 AM
Subject: ODS CSV files
As part of a class assignment, I am having students create a CSV file
using ODS statements. The resulting file has double quotes surrounding
the character data within the comma delimiters. Excel has no problems
reading a CSV fle structured this way so it is an acceptable method of
However, the file looks messy. Is there a style or other option that
will direct ODS to write the file without enclosing character data in
UGA, CAES, Griffin Campus