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