I have a text file where the total record length may come to 1500 in a row. In many fields carraige returns and line feeders are present and moreover the fields are embedded by double quotes and separated by commas. I have converted this text file from Microsoft access where I have lot of missing values. How can I create a sas dataset without data mismatch and without errors using this text file. Your reply is deeply appreciated.
How are you converting from MS/Access to SAS - DATA step or PROC IMPORT? What conversion engines do you have available? You mention a text file; is it being created by MS/Access, and do you have access to its generation process? Are you running SAS9.2? Can we assume that the OS is windows?
If you have SAS9.2, then use the TERMSTR= option of the INFILE statement.
With that option set to CRLF the single embedded LF will not cause the infile buffer parsing any trouble (as happened before SAS9.2)
Thanks for sending your suggestions. And sorry that I haven't responded immediately. The OS is windows and SAS version is 9.2. The Carriage Returns (CR) and Line Feeders (LF) are not present in first row and the fields are separated by commas and the values are given in double codes. The CR and LF are present in source file, i.e. access file and I have created a text file from here.
I have used PROC import using DBMS=accesscs option and now I can able to create SAS datasets but however these CR and LF need to be removed in SAS datasets.