hi ... PICTURE formats work with numeric variables there have been several nice solutions posted that work with character data, here's another possibility ... data want; length b $10; set have; b =catt(a,substr('xxxxxxxxxx',1,9-length(a))); run; similar to Haikuo 's solution, but you should use a length statement when using the CAT functions given that the default length of the result is 200 if you really wanted a one statement solution that gives you a variable with a length of 10, you could get rid of the LENGTH statement and use a PUT function with the CATT result ... data want; set have; b = put(catt(a,substr('xxxxxxxxxx',1,9-length(a))),$10.); run;
... View more