- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear all, would appreciate your help on this.
I have an excel imported data sheet which for the most part looks fine. Within this imported data I have one character variable which for some cases shows ... Now if I try and select variables on the basis that this variable contains ... it selects none. Furthermore when I hover my cursor over the the relevant box on the data screen the pop-up shows a blank line followed by some meaningful text underneath the blank line. I'm guessing then that the character variable in this case is a carriage return followed by text. I want to get rid off the CR and just have the text but I can't seem to get compress or trim to do the trick. Does anyone have any suggestions? Hope my question is clear enough.
Best wishes, Chris
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The syntax for taking out all carriage return ('OD'x) and line feed ('OA'x) characters is
comment= Compress(comment,'0D0A'x);
comment= TRANWRD(comment,'0D0A'x,’’);
If you just want to take out the Carriage Return, use this code: comment= TRANWRD(comment,'0D'x,'');
Sarath
www.studysas.blogspot.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I should add that the closest I have got to a solution is
varname = COMPRESS(varname, ' ',"s")
which does indeed get rid of the leading CR, but also unfortunately gets rid of all blanks in the text which is not quite what I want to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The syntax for taking out all carriage return ('OD'x) and line feed ('OA'x) characters is
comment= Compress(comment,'0D0A'x);
comment= TRANWRD(comment,'0D0A'x,’’);
If you just want to take out the Carriage Return, use this code: comment= TRANWRD(comment,'0D'x,'');
Sarath
www.studysas.blogspot.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The compress statement has worked a treat, many thanks Sarath.