| Date: | Wed, 17 Sep 2003 11:33:54 -0400 |
| Reply-To: | Bruce Johnson <bjohnson@SOLUCIENT.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Bruce Johnson <bjohnson@SOLUCIENT.COM> |
| Subject: | Delimited Files |
OK, yes, they're easy enough to create. However, I want to add a header
line, with the name of the fields. This exercise has brought up two issues:
1) How can I remove the quotes around the header record?
2) What exactly is put (_all_) (:) doing? I can't find it in the archives
or in the SAS documentation.
Here is the sample code I'm trying to run. It produces no errors, but gives
me quotes around the header record... Removing the quotes around the put
"&vnames" statement produces an error.
data test;
input a $ b $;
cards;
michael jordan
scotty pippen
horace grant
;
run;
proc sql noprint;
select trim(name)
into :vnames separated by '|'
from dictionary.columns
where libname="WORK"
& memname="TEST"
order by varnum
;
quit;
data _null_;
set test;
file "desktop\helpme.txt" dlm="|" dsd lrecl=1000;
if _n_=1 then do;
put "&vnames";
end;
put (_all_)(:);
run;
_______________________________
Bruce A. Johnson
Senior Data Analyst
Solucient, LLC
(847) 440-9635
bjohnson@solucient.com
This message is a private communication. It may contain information that is
confidential and legally protected from disclosure. If you are not an
intended recipient, please do not read, copy or use this message or any
attachments, and do not disclose them to others.
Please notify the sender of the delivery error by replying to this message,
and then delete it and any attachments from your system. Thank you.
Solucient LLC.
|