BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
scb
Obsidian | Level 7 scb
Obsidian | Level 7

CustNo

12345671819

17289201010

 

May I know how to disguise the 5th to 8th digit of the CustNo from number to XXXX? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26
data want;
custno="12345671819";
substr(custno,5,4)="XXXX";
run;

Typo updated. 

View solution in original post

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26
data want;
custno="12345671819";
substr(custno,5,4)="XXXX";
run;

Typo updated. 

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1111 views
  • 0 likes
  • 2 in conversation