LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 11 Aug 2009 10:31:26 -0400
Reply-To:   Peter Flom <peterflomconsulting@mindspring.com>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Peter Flom <peterflomconsulting@MINDSPRING.COM>
Subject:   Re: PROC EXPORT creating extra row
Comments:   To: "Data _null_," <iebupdte@gmail.com>
Content-Type:   text/plain; charset=UTF-8

Thanks for the help so far.

OK, a little more detail ....

I like to make graphs in R; my usual procedure is to write a .csv file, and then read that into R. This usually works with no p

What made me suspicious was that the variables have odd values in the R file; indeed, exactly one subject has odd values on a lot of variables. Not missing, not a blank, just .... there somehow.

But maybe the error is elsewhere ....

In any case, I have another appointment, then I have to go .... will be back in this office on Thursday and will report back then with more detail

Peter

-----Original Message----- >From: "Data _null_;" <iebupdte@gmail.com> >Sent: Aug 11, 2009 10:10 AM >To: Peter Flom <peterflomconsulting@mindspring.com> >Cc: SAS-L@listserv.uga.edu >Subject: Re: PROC EXPORT creating extra row > >The first record is the Variable names, which makes one more than >number of records in data. > >Not sure about lrecl it may seem odd, but maybe not. What are >attributes of variables? > >On 8/11/09, Peter Flom <peterflomconsulting@mindspring.com> wrote: >> Hello >> >> I am running PROC EXPORT to convert a SAS data set to .csv format. >> >> The Export code is >> >> PROC EXPORT DATA= WORK.TODAY >> OUTFILE= "C:\Analysis\Daniel OBrien\danny.csv" >> DBMS=CSV LABEL REPLACE; >> PUTNAMES=YES; >> RUN; >> >> Start of LOG file is >> >> /********************************************************************** >> 420 * PRODUCT: SAS >> 421 * VERSION: 9.2 >> 422 * CREATOR: External File Interface >> 423 * DATE: 11AUG09 >> 424 * DESC: Generated SAS Datastep Code >> 425 * TEMPLATE SOURCE: (None Specified.) >> 426 ***********************************************************************/ >> 427 data _null_; >> 428 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ >> 429 %let _EFIREC_ = 0; /* clear export record count macro variable */ >> 430 file 'C:\Analysis\Daniel OBrien\danny.csv' delimiter=',' DSD DROPOVER lrecl=32767; >> 431 if _n_ = 1 then /* write column names or labels */ >> 432 do; >> 433 put >> 434 '"' "ID" '"' >> 435 ',' >> 436 '"' "Age" '"' >> 437 ',' >> 438 '"' "Sex" '"' >> 439 ',' >> >> End of LOG is >> >> >> NOTE: 126 records were written to the file 'C:\Analysis\Daniel OBrien\danny.csv'. >> The minimum record length was 93. >> The maximum record length was 1375. >> NOTE: There were 125 observations read from the data set WORK.TODAY. >> NOTE: DATA statement used (Total process time): >> real time 0.13 seconds >> cpu time 0.10 seconds >> >> >> note that 126 were written, although only 125 were read, also the weird max record length. >> >> >> any ideas what I am doing wrong? >> >> TIA >> >> Peter >> >> Peter L. Flom, PhD >> Statistical Consultant >> www DOT peterflomconsulting DOT com >> I write some at:http://www.associatedcontent.com/user/582880/peter_flom.html >> I trade books at http://www.bookmooch.com/ >>

Peter L. Flom, PhD Statistical Consultant www DOT peterflomconsulting DOT com I write some at:http://www.associatedcontent.com/user/582880/peter_flom.html I trade books at http://www.bookmooch.com/


Back to: Top of message | Previous page | Main SAS-L page