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 (July 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Jul 2009 12:21:22 -0500
Reply-To:     "Data _null_;" <iebupdte@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Data _null_;" <iebupdte@GMAIL.COM>
Subject:      Re: SASware Ballot - Change LRECL
Comments: To: Randy Herbison <RandyHerbison@westat.com>
In-Reply-To:  <A8625BEB312CB2469E61B5E17F59B949081C51DA@EX-CMS01.westat.com>
Content-Type: text/plain; charset=ISO-8859-1

I did test it and it does produce the desired effect with V9.1.

1 filename FT42F001 'c:\temp\TESTLRECL.CSV' lrecl=1048576; 2 proc export outfile=FT42F001 dbms=csv data=sashelp.class; 3 run;

4 /********************************************************************** 5 * PRODUCT: SAS 6 * VERSION: 9.1 7 * CREATOR: External File Interface 8 * DATE: 29JUL09 9 * DESC: Generated SAS Datastep Code 10 * TEMPLATE SOURCE: (None Specified.) 11 ***********************************************************************/ 12 data _null_; 13 set SASHELP.CLASS end=EFIEOD; 14 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ 15 %let _EFIREC_ = 0; /* clear export record count macro variable */ 16 file FT42F001 delimiter=',' DSD DROPOVER ; 17 format Name $8. ; 18 format Sex $1. ; 19 format Age best12. ; 20 format Height best12. ; 21 format Weight best12. ; 22 if _n_ = 1 then /* write column names */ 23 do; 24 put 25 'Name' 26 ',' 27 'Sex' 28 ',' 29 'Age' 30 ',' 31 'Height' 32 ',' 33 'Weight' 34 ; 35 end; 36 do; 37 EFIOUT + 1; 38 put Name $ @; 39 put Sex $ @; 40 put Age @; 41 put Height @; 42 put Weight ; 43 ; 44 end; 45 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */ 46 if EFIEOD then call symputx('_EFIREC_',EFIOUT); 47 run;

NOTE: The file FT42F001 is: File Name=c:\temp\TESTLRECL.CSV, RECFM=V,LRECL=1048576

NOTE: 20 records were written to the file FT42F001. The minimum record length was 17. The maximum record length was 26. NOTE: There were 19 observations read from the data set SASHELP.CLASS. NOTE: DATA statement used (Total process time): real time 0.07 seconds cpu time 0.03 seconds

19 records created in FT42F001 from SASHELP.CLASS

On 7/29/09, Randy Herbison <RandyHerbison@westat.com> wrote: > Good idea, but PROC EXPORT (using the EFI) seems to have a mind of its own: > > 262318 filename csv "C:\TEMP\test.csv" lrecl=50000; > 262319 > 262320 PROC EXPORT DATA= WORK.TEST > 262321 OUTFILE= csv > 262322 DBMS=CSV REPLACE; > 262323 PUTNAMES=YES; > 262324 RUN; > > 262325 /********************************************************************** > 262326 * PRODUCT: SAS > 262327 * VERSION: 9.2 > 262328 * CREATOR: External File Interface > 262329 * DATE: 29JUL09 > 262330 * DESC: Generated SAS Datastep Code > 262331 * TEMPLATE SOURCE: (None Specified.) > 262332 ***********************************************************************/ > 262333 data _null_; > 262334 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ > 262335 %let _EFIREC_ = 0; /* clear export record count macro variable */ > 262336 file CSV delimiter=',' DSD DROPOVER lrecl=32767; > > Too bad SAS doesn't include the SCL source code. If it did, we could modify it. > > -Randy > > > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of data _null_ > Sent: Wednesday, July 29, 2009 11:08 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: SASware Ballot - Change LRECL > > On Jul 29, 9:30 am, My <my0...@gmail.com> wrote: > > How does one add an item to the SASware Ballot? A collegue of mine > > wants an lrecl parameter to be added to proc export for csv so he can > > change to lrecl to the max of 1048576 from the default 32767. In the > > mean time, if anyone has a solution for his needs, it would be greatly > > appreciated. > > > > Thanks. > > Myra > > Use a FILEREF for the OUTFILE parameter... > > filename FT42F001 'TESTLRECL.CSV' lrecl=1048576; > proc export outfile=FT42F001 dbms=csv data=sashelp.class; > run; >


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