BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Babloo
Rhodochrosite | Level 12

When I tried to print the values of SAS dataset in HTML form/page, I observed that some non english characters ( e.g. 0000036455 (BSJKK 仙台営業所)) are printed as you see in the attachment . However when I tried to query (e.g. where ID like '0000036455%') the dataset with that value I do not see them at all.

 

What would be the likely cause for this issue? Any help to resolve this? Not sure if this is some junk characters which was displayed in HTML while printing SAS dataset values. However I should see the number (0000036455) atleast in SAS dataset but I could not see. I'm sure that I'm referring the correct dataset as I could see some values in the dataset which was shown in HTML and in those values there is no junk characters appended with the number.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
Try these three ways:
1)
where strip(ID) like '0000036455%'

2)
where ID like '%0000036455%'

3)
where find(ID,'0000036455')

View solution in original post

4 REPLIES 4
LinusH
Tourmaline | Level 20

Maybe you can try to use the compress function with the W modifier.

Data never sleeps
Kurt_Bremser
Super User

If both the number and the Chinese characters occupy the same column, it seems to me that the number is immediately followed by a blank, so

scan(column,1)

will get you the number without the other stuff.

Ksharp
Super User
Try these three ways:
1)
where strip(ID) like '0000036455%'

2)
where ID like '%0000036455%'

3)
where find(ID,'0000036455')

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 4 replies
  • 697 views
  • 1 like
  • 4 in conversation