简体   繁体   English

在sas中具有相同长度的表中创建键字段

[英]create a key field in a table of the same length in sas

I have a key field in a SAS table that is a sequential number. 我在SAS表中有一个关键字段,它是一个序列号。 I want to create a key with that number but with some zeros first of the number, so that all the items of the key have length=15. 我想用该数字创建一个密钥,但该数字的开头先有一些零,以便该密钥的所有项目的长度都为15。

can someone help? 有人可以帮忙吗?

thanks 谢谢

You can use z. 您可以使用z. format: 格式:

charackterKey = put(numericKey,z15.);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM