The SAS Output Delivery System and reporting techniques

Changing the delimiter in the ods csv

Reply
Contributor
Posts: 58

Changing the delimiter in the ods csv

Hi to all,
I've to produce a csv with ';' as delimiter. I've searched for documentation, and found that it should be done by using

ods csv file='c:\test' options(delimitator=';');

...

...but it doesn't work, I still get a ',' as dlm.
Any idea?
Thanks

Daniele
Super Contributor
Super Contributor
Posts: 3,174

Re: Changing the delimiter in the ods csv

Posted in reply to DanieleTiles
I believe that the option (check your spelling, by the way) is only supported at SAS 9.2. and later.

Scott Barry
SBBWorks, Inc.
SAS Super FREQ
Posts: 8,866

Re: Changing the delimiter in the ods csv

Posted in reply to DanieleTiles
Hi:
Check your syntax, I believe the suboption is DELIMITER, not DELIMITATOR. You may need to update the CSV tagset that you're using, especially if you're working in SAS 9.1.3. See this previous posting for more info:
http://support.sas.com/forums/thread.jspa?threadID=5414

When I run the below code in SAS 9.2, I get the ';' used as the delimiter. I believe the delimiter capability was accomplished in SAS 9.1.3 by using an updated CSV tagset template.

cynthia

[pre]
ods csv file='c:\temp\csvtest.csv'
options(doc='Help' delimiter=";");
proc print data=sashelp.class(obs=3);
run;
ods csv close;
[/pre]
Super Contributor
Super Contributor
Posts: 3,174

Re: Changing the delimiter in the ods csv

Posted in reply to Cynthia_sas
Searching the SAS discussion forum archives with keywords "ods csv change delimiter", the gem below appears in the match-results:

http://support.sas.com/forums/thread.jspa?messageID=19459䰃


I stand corrected - the support comes with an updated tagset.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 3 replies
  • 2505 views
  • 0 likes
  • 3 in conversation