BookmarkSubscribeRSS Feed
asra
Calcite | Level 5
Hello, value is 100010245698
Out put wants like xxxxxxxxx5698
3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

Is your value numeric or character?

asra
Calcite | Level 5
Numeric
PeterClemmensen
Tourmaline | Level 20

Here is one way

 

proc format;
    picture mask (default=12)
        low-high = '9999' (prefix='XXXXXXXX');
run;

data test;
    value=100010245698;
    format value mask.;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 770 views
  • 5 likes
  • 2 in conversation