Date: Tue, 12 Feb 2008 13:33:30 -0500
Reply-To: Nathaniel.Wooding@DOM.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: removing column headers from .csv file
In-Reply-To: <2a8c149f-0c59-4198-bdc3-e6c1a70b5bfe@e23g2000prf.googlegroups.com>
Content-Type: text/plain; charset="US-ASCII"
This can also be done within a data step. I added a couple extra variables
for fun;
data xx;
input Date : yymmdd8. ;
format Date yymmdd10.;
retain b 'xx' c 'yyyy';
filename csv 'c:\csvtest.txt';
file csv dlm = ',' ;
put date b c ;
cards;
08-01-11
08-01-12
08-01-13
08-01-14
;
run;
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
jamesgreen55@YAHO
O.CA
Sent by: "SAS(r) To
Discussion" SAS-L@LISTSERV.UGA.EDU
<SAS-L@LISTSERV.U cc
GA.EDU>
Subject
Re: removing column headers from
02/12/2008 01:13 .csv file
PM
Please respond to
jamesgreen55@YAHO
O.CA
On Feb 12, 9:53 am, sas...@gmail.com wrote:
> Dear all,
>
> I have created a .csv file using proc export from a sas dataset which
> has 8 variables in it. Can someone tell me if it is possible to delete
> the row containing the column headers and how can we do that?
>
> Regards,
I tweaked SAS 'Export' code and this approach seems to work.... see
below;
(works on WinXP SAS 9.1).
data xx;
input Date : yymmdd8. ;
format Date yymmdd10.;
cards;
08-01-11
08-01-12
08-01-13
08-01-14
;
run;
*;
data _null_;
set WORK.Xx;
file 'C:\temp\test.csv'
delimiter=',' DSD DROPOVER lrecl=32767;
do;
EFIOUT + 1;
put Date ;
end;
run;
-----------------------------------------
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.