fainy荧 发表于 2015-8-11 12:20
为什么照着代码打 运行后first的长度是15求大神解答
因为SAS 9.4之后scan function default length 定义变了,具体参照这里:
http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p0jshdjy2z9zdzn1h7k90u99lyq6.htm
In a DATA step, if the SCAN function returns a value to a variable that has not yet been given a length, that variable is given the length of the first argument. This behavior is different from the behavior in previous releases of SAS. In previous releases, code that created a variable with a length of 200 might have produced a variable with a length that was greater than expected. If you need the SCAN function to assign a variable with a value that is different from the length of the first argument, use a LENGTH statement.