BookmarkSubscribeRSS Feed
Scottcom4
Calcite | Level 5
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;
2 REPLIES 2
LinusH
Tourmaline | Level 20
Maybe this sample can help you out:

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

/Linus
Data never sleeps
deleted_user
Not applicable
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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 645 views
  • 0 likes
  • 3 in conversation