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 (October 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 1 Oct 2009 16:39:41 -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: PROC IMPORT Bug in 9.2 TS2M0
Comments: To: Deborah Testa <dtesta@sevenofninesystems.com>
In-Reply-To:  <I9Cdnf-wM_n7e1nXnZ2dnUVZ_gOdnZ2d@earthlink.com>
Content-Type: text/plain; charset=ISO-8859-1

On 10/1/09, Deborah Testa <dtesta@sevenofninesystems.com> wrote: > My years-old PROC IMPORT code broke in 9.2 TS2M0.

There are always incompatibilities with version upgrades. They are hard to find, and like this one very annoying. We (SAS-L) have already identified a bug in PROC IMPORT with regards to LRECL on the INFILE statement.

I'm not sure I would have trusted PROC IMPORT for "production" program. Did the CSV change format from run to run that made PROC IMPORT more convenient?

If you only need to know variable order from row 1 and type and other attributes are static you can write a two data step program that simulates what PROC IMPORT is doing for now. This program would be less likely to out smart itself.

> The algorithm to determine if a value is a date, datetime or time was > changed in SAS 9.2. Unfortunately it looks like there is a problem with > typing some of the values to determine if the value is a date, time or > datetime. I will report this problem to the developer. In the > meantime, you will need to recall the generated DATA step code assuming > you are using PROC IMPORT in interactive mode. To recall the generated > DATA step code, you will need to make certain you have the EDITOR window > active and then do a RUN-RECALL LAST SUBMIT after the PROC IMPORT has > run. The generated DATA step will appear in the Editor Window and you > can change the INFORMAT, FORMAT and INPUT statement for the 2 variables, > VSBT and GNDRCODE, so they are read in as character. Then you will > resubmit the generated DATA step code to receive expected results.

This could be automated with a PROC PRINTTO LOG= and a fiddly data step. Might be fun to try that.

> Since I still have SAS 8.2 installed, I'm going to run my PROC IMPORT > steps in 8.2 rather than introduce the manual step into the middle of an > automated series of steps. > > > > My data contains codes for gender (2201 for Male and 2202 for Female). > When I read those values from a .csv file into SAS using PROC IMPORT, > SAS creates a numeric variable (fine) but uses a datetime. format and > the anydtdtm40. informat. , creating raw values of 1956614400 and > 1959292800. >


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