Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to remove carriage return and linefeed characters within quoted strings.

HANDLING Special Embedded CHARACTERS To manage and report data in DBMS that contains very long text fields is not easy. This can be frustrating if the text field has special embedded symbols such as tabs, Carriage returns (‘OD’x ), line feeds (‘OA’x) and page breaks. But here is simple SAS code which takes care of those issues. The normal line end for Windows text files is a  Carriage Return character or a line feed character so  The syntax for taking out all carriage return ('OD'x) and line feed ('OA'x) characters is comment= Compress(comment,'0D0A'x);                              or comment= TRANWRD(comment,'0D0A'x,’’); If you just want to take out the Carriage Return, use this code: comment= TRANWRD(comment,'0D'x,''); You could also try this one too.. Comment=compress(Comment, ,"kw");*k is for keep, w is for "write-able"; ...

[[ This is a content summary only. Visit my website for full links, other content, and more! ]]



This post first appeared on StudySAS, please read the originial post: here

Share the post

How to remove carriage return and linefeed characters within quoted strings.

×

Subscribe to Studysas

Get updates delivered right to your inbox!

Thank you for your subscription

×