Help using Base SAS procedures

CSV Delimiter

Reply
Contributor
Posts: 42

CSV Delimiter

Good Afternoon All,

I have a freeform field called description in a database which allows the user to type on multiple lines. When the data is imported through SAS as a CSV the enter forces the remainder of the data into the next observation which happens to be a date and obviously the log shows errors.

Is there anyway to have SAS ignore this enter and keep the data in the desired observation?

Thank you for your help.

This is the code I am using.

DATA WORK.IMPW_0001;

INFILE "\\mprqsas401\\data\CATClaimsByLocation.csv"
DELIMITER=','
MISSOVER
DSD
LRECL=32767
FIRSTOBS=2
;
LENGTH
ID$ 11
Description $ 478
ReportedDate 8

;
INFORMAT
ReportedDate DDMMYY8.0
;
FORMAT
ReportedDate DDMMYY10.0
;
INPUT
ID $
Description $
ReportedDate

;
LABEL
ID= "ID"
Description = "Description"
ReportedDate = "ReportedDate"
;
RUN;
Super User
Posts: 5,256

Re: CSV Delimiter

Maybe this sample can help you out:

http://support.sas.com/kb/26/065.html

/Linus
Data never sleeps
N/A
Posts: 0

Re: CSV Delimiter

The above suggestion will answer your question directly.

From a different angle,
could you just read the database directly instead of having to import the data through an exported flat file?
Ask a Question
Discussion stats
  • 2 replies
  • 108 views
  • 0 likes
  • 3 in conversation