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?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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