I need to scan a column to find all the chacters within each string. The data is in hindi so they are all double byte characters. So what I need is really all the Hindi characters used on the column. I need a way of scan each string row and find the double byte character then output that chracter and then move on to the next character and so on...
Suggest you review the SAS National Language Support (NLS) companion documentation. I expect you can use the SUBSTR function in a DO loop UNTIL you reach the LENGTH (function) of the SAS CHARACTER type variable.
Recommended Google advanced search argument, this topic/post:
sas national language support dbcs unicode site:sas.com
What is _row_? Maybe a SAS column/variable? Definitely, I expect you can easily parse the SAS character variable using SUBSTR function, creating individual character variables/columns, as you require, also to generate individual observations within a DO / END using some IF THEN OUTPUT; logic within the DO/END paragraph, as suggested previously.
A straightforward DATA step program should accomplish the task as you have described.
The "K" functions can be used to manipulated strings where a character may take more than one byte. For instance, you could use KLENGTH to get the length of the string, then pick characters out of the string with KSUBSTR in a loop. A log snippet showing this is at the bottom of this post.
19 data _null_;
20 text = 'abcdef';
21 do i = 1 to klength(text);
22 c = ksubstr(text, i, 1);
23 put c;