| Date: | Thu, 23 Dec 2010 15:38:49 -0800 |
| Reply-To: | art297 <atabachneck@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | art297 <atabachneck@GMAIL.COM> |
| Subject: | Re: Raw import - Can SAS just ignore funky values? |
| Content-Type: | text/plain; charset=ISO-8859-1 |
Clayton,
Take a look at:
http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000146932.htm
I think it provides everything you need, particularly getting rid of
control characters before parsing the input.
Art
------------
On Dec 23, 10:51 am, Clayton <claytonro...@gmail.com> wrote:
> I'm doing a raw import that looks like this:
>
> data active;
> infile DL(activeraw.csv) firstobs=2 dsd;
> input item_ID Custom_Label $ Product_ID_Type
> Product_ID_Value...........
>
> The data is comma delimited. Thing is, one of the fields has a
> problematic character. It shows up in excel as one of those mini-
> boxes with a question mark in it. I'm going to be reporting with new
> data regularly, so deleting the offending bits is a cumbersome
> option.
>
> Here is what one offending piece looks like, copied from notepad:
>
> previousvalue,"Shipped on 10/29/2010. Tracking number:
> OK",nextvalue
>
> (The bad piece is after "tracking number" and only shows up in excel--
> I don't know what it is. The hard return is in the raw data - Perhaps
> that is all this is, a hard return? Because Excel shows the 'error
> character' and not the "OK" that is shown above)
>
> Can I tell sas to just somehow ignore between the double quotes? It
> does generate an error in the log, affects the values that come after
> it, but does not affect the next observation or stop the execution.
|