BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
VVDR
Obsidian | Level 7

Hi All,

Good day !!!

When I am extracting the data directly from AWS S3 to SAS, I am getting a special character only to few observations and that is not expected and not present in the source. 

Ex: For Column ID=100, In the Description variable value I am getting like this below.

" This is has to be state level \n  information to get the business \n details \n "

Something like this.

Please advise what could be the reason. Column Description has 2000 character Length defined in the Dataset attributes level. 

 

Please advise. 

Thanks  

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@VVDR wrote:

Hi All,

Good day !!!

When I am extracting the data directly from AWS S3 to SAS, I am getting a special character only to few observations and that is not expected and not present in the source. 

Ex: For Column ID=100, In the Description variable value I am getting like this below.

" This is has to be state level \n  information to get the business \n details \n "

Something like this.

Please advise what could be the reason. Column Description has 2000 character Length defined in the Dataset attributes level. 

 

Please advise. 

Thanks  


How are you looking at the data that leads you to believe "not present in the source"? If it is a viewer application from the source does that row display text in that variable/field/column on 3 lines in the data? If so those may be instructions for that viewer to display the following text on a "new line". The characters are there just not displayed in some application.

 

You can remove them in a data step with code like:

data example;
   x=" This is has to be state level \n  information to get the business \n details \n ";
   x=compbl(tranwrd(x,'\n','') );
run;

View solution in original post

2 REPLIES 2
ballardw
Super User

@VVDR wrote:

Hi All,

Good day !!!

When I am extracting the data directly from AWS S3 to SAS, I am getting a special character only to few observations and that is not expected and not present in the source. 

Ex: For Column ID=100, In the Description variable value I am getting like this below.

" This is has to be state level \n  information to get the business \n details \n "

Something like this.

Please advise what could be the reason. Column Description has 2000 character Length defined in the Dataset attributes level. 

 

Please advise. 

Thanks  


How are you looking at the data that leads you to believe "not present in the source"? If it is a viewer application from the source does that row display text in that variable/field/column on 3 lines in the data? If so those may be instructions for that viewer to display the following text on a "new line". The characters are there just not displayed in some application.

 

You can remove them in a data step with code like:

data example;
   x=" This is has to be state level \n  information to get the business \n details \n ";
   x=compbl(tranwrd(x,'\n','') );
run;
VVDR
Obsidian | Level 7
Hi ballardw,
Thanks for your quick reply. And what you have advised is absolutely correct. In the upstream it is divided the observation value into 3 lines and sas is separating it with \n.
Thanks again for sharing the knowledge.

Regards

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 596 views
  • 1 like
  • 2 in conversation