if it was just to provide delimiters, the DSD option would not be neccessary here.
DSD provides only a single character delimiter on lines generated with put statements, so extra arrangements are needed to create multiple character delimiters like "||".
Hence the solution Tim@ has offered.
I want to recommend one small change.
I would still recommend DSD here, because it also provides protection against delimiters embedded in data values. Imagine a pipe mark embedded in a character string ... if that is the reason for proposing double pipes as delimiter, beware it is equally unsafe in 100% of cases (if one pipe mark can occur, one day two will happen, probably)
DSD protects against embedded delimiters by "quoting the value". However it looks for the delimiter defined or defaulted on the FILE statement.
So that is the change I recommend to the solution offered by Tim@SAS
[pre] FILE LOG DSD DLM='|' ; [/pre]
Then the protection routines of the FILE statement will be protecting against pipe marks rather than the default delimiter which is a comma.
Before SAS8 introduced DSD handling on the file statement, the +(-1) technique was effective at removing the default blank provided between variables listed in the (variable-list) when there are no formats in the (format-list). That was the technique for generating csv type output before SAS8: [pre] data _null_;
set sashelp.class ;
put (_all_)( +(-1) ',' ) ;
run; [/pre]
Of course the old technique is still effective, just unneccessary, except when a multi-character delimiter is needed.
sorry about the "history lesson", but remember always protect against delimiters embedded in data.
PeterC