在 sas 中创建相同长度的 table 中的键字段

create a key field in a table of the same length in sas

我在 SAS table 中有一个关键字段,它是一个序号。我想用那个数字创建一个密钥,但在数字的前面加上一些零,这样密钥的所有项目都有长度=15。

有人可以帮忙吗?

谢谢

您可以使用z.格式:

charackterKey = put(numericKey,z15.);