I think you are looking for a z4. format from the question but not positive. Check out this explanation and see if that is what you are looking for: https://communities.sas.com/t5/SAS-Procedures/how-to-pad-character-variable-with-leading-zeroes/td-p/40486
... View more