Fixes embedded cr / lf / crlf in CSV. More...
CSVs will sometimes contain lf or crlf within quotes (eg when saved by excel). When the termstr is ALSO lf or crlf that can be tricky to process using SAS defaults. This macro converts any csv to follow the convention of a windows excel file, applying CRLF line endings and converting embedded cr and crlf to lf.
fileref mycsv "/path/your/csv"; %mp_cleancsv(in=mycsv,out=/path/new.csv)
|in=||provide path or fileref to input csv|
|out=||output path or fileref to output csv|
|qchar=||quote char - hex code 22 is the double quote.|
Definition in file mp_cleancsv.sas.