BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BrahmanandaRao
Lapis Lazuli | Level 10

Data dsn;

X='america';

run;

 

I want Output like

AmeRiCa 

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

If so, then do something like this

 

data _null_;
   string="america";
   newstring=translate(string, "ARC", "arc");

   put string= // newstring=;
run;

View solution in original post

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

What is the logic here? Do you want to consequently Upcase the letters A, R and C?

PeterClemmensen
Tourmaline | Level 20

If so, then do something like this

 

data _null_;
   string="america";
   newstring=translate(string, "ARC", "arc");

   put string= // newstring=;
run;
Kurt_Bremser
Super User

If there is a logical rule for this conversion, you need to tell us that, so we can translate it into code.

If there is no logical rule, then there's no base for any code.