> There is in 9.2, a
> delimiter= option that allows you to change the
> delimiter from a comma to a tab character (which is
> 09'x, I believe) for ODS CSV.
That will be a nice feature. I look forward to using 9.2, soon perhaps.
The features of the FILE and PUT statement plus the call routine VNEXT make the data step solution fairly concise.
filename FT24F001 temp lrecl=512;
data _null_;
file FT24F001 dsd dlm='09'x;
set sashelp.shoes(obs=3);
if _n_ eq 1 then link nameRow;
put (_all_)(:);
return;
nameRow:
length _LABEL_ $128 _NAME_ $32;
if _n_ eq 1 then do;
do while(1);
call vnext(_name_);
if _name_ eq '_LABEL_' then leave;
_label_ = vlabelx(_name_);
put _label_ @;
end;
put;
end;
return;
run;
data _null_;
infile FT24F001;
input;
list;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.