title: How to add leading zeros to character field in SAS?
body: <p>I trying to figure out the following: I have SAS dataset 'ids' with character variable with different length such as idnum3, idnum897 or idnum2342345. Need to create each ID with the same length and add leading zeros to have soething like '000000idnum3','0000idnum897', idnum2342345. I tried many options but it seems nothing works. Any suggestions please. Thanks! </p>