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 (November 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 3 Nov 2007 17:56:45 +1300
Reply-To:   Robin Templer <templerr@CLEAR.NET.NZ>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Robin Templer <templerr@CLEAR.NET.NZ>
Subject:   Re: filename statement in Proc Import
Comments:   To: rmat <regivm@GMAIL.COM>
In-Reply-To:   <1194006195.777174.74340@57g2000hsv.googlegroups.com>
Content-type:   text/plain; charset=us-ascii

The missing values seem to be towards the end of your records ??

Try adding a LRECL=500 (or some other large number up to 32K ) to the end of your filename statement . filename lista '/ahome/mstrv/itdvlp/pid_aggr.csv' LRECL=500 ;

Cheers Robin

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of rmat Sent: Saturday, 3 November 2007 1:23 a.m. To: SAS-L@LISTSERV.UGA.EDU Subject: filename statement in Proc Import

Hi SASers,

I am facing a very curious issue. I am trying to import a CSV file in UNIX environemnt using two approaches and I am confused by changes in results.

1st Approach -------------------

proc import datafile='/ahome/mstrv/itdvlp/pid_aggr.csv' out=aggr dbms=dlm replace; delimiter=','; getnames = yes; run;

This approach works fine. A section of the print out is shown below

Obs agg64 agg65 agg66 agg67 agg68 agg69 1 183 184 185 186 187 188 2 102 104 106 106 108 108 3 103 105 107 107 109 109

2nd Approach -------------------

filename lista '/ahome/mstrv/itdvlp/pid_aggr.csv';

proc import datafile=lista out=aggr dbms=dlm replace; delimiter=','; getnames = yes; run;

In this case I get certain values of one row missing (shown below). As you can see only change is how I call the external file.

Obs agg64 agg65 agg66 agg67 agg68 agg69 1 183 . . . . . 2 102 104 106 106 108 108 3 103 105 107 107 109 109

Can somebody please explain why these two approaches are giving different results?

Thanks very much, Regi


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