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.

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 385 views
  • 2 likes
  • 3 in conversation