BookmarkSubscribeRSS Feed
YuriGut
Calcite | Level 5

Hi All

I got character object ( <FlagsList> ) that look like this  (,701,803,555,523)  all i want, it's to exclude particular number and comma for examle <<,701>>  or multipal chose of numbers like <<,701,555>>

I try to find some RTDM function  like COMPRESS or TRIM and used them different ways

All my results were  like exclude of digits and not complete number

like COMPRESS (FlagsList , ',701')  gave me (83 555 523)

 

Some Help Please

6 REPLIES 6
PeterClemmensen
Tourmaline | Level 20

You can do something like this

 

data have;
string="(,701,803,555,523)";
newstring=tranwrd(string, ",701", "");
run;
YuriGut
Calcite | Level 5
Hi
Thank you , but I looking for RTDM function only solution.
BrunoMueller
SAS Super FREQ

Have a look here http://support.sas.com/kb/44/456.html seems like you should be able to use tranwrd with the workaround suggested.

Rick_SAS
SAS Super FREQ

What is RTDM and BRM? Please explain.

 

YuriGut
Calcite | Level 5

Hi

RTDM its real time desicion manager or SASCIStudio and BRM its Bussiness Rules Manage

psmerill
Obsidian | Level 7

Hello,

 

have you already tried a combination of the following functions:

1. CAT(string, string, ...): it concatenates the argument of the function;

2. SUBSTR(string, position, length): it returns a substring;

3. INDEX(source, excerpt): it searches the source for the character string specified by the excerpt. It returns the position of the source into the excerpt;

4. LENGTHC(string): it returns the length of a string.

 

Paolo

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 6 replies
  • 1018 views
  • 0 likes
  • 5 in conversation