The attached file contains one column and 25 rows. The length of the string in the column is 16, but the format is given as $30.
When I try to export the dataset into .csv or any other format, the strings get broken into two parts and make 50 rows.
Can some please help me exporting the string intact ?
My Contact number is +91 - 9711913925
Skype id is rajat.musigma
email - rajatagarwalismd@gmail.com
You appear to have an embedded linefeed ( ''0A'x ) in each string. That is why it is displaying as two line on the export ('0A'x is the end-of-line character in Unix and many PC programs also interpret it that way.
303038363538313332300A3130323930
If the hex output for your first line of data (note the '0A').
Doc Muhlbaier
Duke
Dear Sir,
Thanks a lot for the insight. I was expecting something like an "Enter key" embedded within the string. It very much explains the issue.
Could you please suggest me a way to remove this ( ''0A'x ) from the string, as I need to extract data in the intact form ?
Also, could you please help me how to get the hexadecimal of the string/number in SAS.
Thanks a lot,
Rajat
Rajat,
To display the hex representation of a character string, I simply applied the $hex format to it. You can read about that in the documentaiton.
To remove the control characters from a string, use the COMPRESS function. See
http://www2.sas.com/proceedings/sugi31/028-31.pdf
or the documentation for exact syntax.
Doc
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.