|
According to the SAS Language Reference: Dictionary, the DSD option on
the FILE statement enables you to write delimited data values that
contain embedded delimiters using simple or modified list output.
This option is ignored for other types of output (e.g. formatted,
column, named). The DATA step below that writes "Test 1" illustrates
that DSD is not used for formatted output.
data inp;
input a b c;
datalines;
1 2 3
2 3 4
3 4 5
4 5 6
5 6 7
6 7 8
;
/*
*/
/* formatted output, so no delimiter */
/* after variable A
*/
/*
*/
data _null_;
set inp;
file log dsd;
if _n_ = 1 then
put 'Test 1';
put a 5.0 (b c) (:2.0);
run;
/*
*/
/* remove format, so simple list
*/
/* output
*/
/*
*/
data _null_;
set inp;
file log dsd;
if _n_ = 1 then
put 'Test 2';
put a (b c) (:2.0);
run;
/*
*/
/* manually place delimiter after */
/* formatted output
*/
/*
*/
data _null_;
set inp;
file log dsd;
if _n_ = 1 then
put 'Test 3';
put a 5.0 ',' (b c) (:2.0);
run;
/*
*/
/* modified list for all variables */
/*
*/
data _NULL_;
set inp;
file log dsd;
if _n_ = 1 then
put 'Test 3';
put a :5.0 (b c) (:2.0);
run;
|
