DATA Step, Macro, Functions and more

SAS Base Query

Accepted Solution Solved
Reply
Contributor scb
Contributor
Posts: 69
Accepted Solution

SAS Base Query

CustNo

12345671819

17289201010

 

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


Accepted Solutions
Solution
‎03-01-2017 04:02 AM
Super User
Super User
Posts: 7,988

Re: SAS Base Query

[ Edited ]
data want;
custno="12345671819";
substr(custno,5,4)="XXXX";
run;

Typo updated. 

View solution in original post


All Replies
Solution
‎03-01-2017 04:02 AM
Super User
Super User
Posts: 7,988

Re: SAS Base Query

[ Edited ]
data want;
custno="12345671819";
substr(custno,5,4)="XXXX";
run;

Typo updated. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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