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
Meteorite | Level 14

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

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 3770 views
  • 0 likes
  • 5 in conversation