m*****8 发帖数: 27 | 1 请问TRUNCOVER起的作用是什么,附件里Little SAS Book的这段话我不太懂,哪位高手
给解释一下啊?谢谢! |
p********a 发帖数: 5352 | 2 如果没有TRUNCOVER,SAS读第一个OBS最后一个变量的时候,读22-37,但是Maple Ave.
没有16位长,SAS就继续读下一行,把Sylvia读成第一个OBS的STREET的一部分。
TRUNCOVER就是告诉SAS,最后一个变量,有多长就读多少,不要扯到下一个去。 |
m*****8 发帖数: 27 | 3 那如果这件事发生在中间而不是末尾的话(加入Maple Ave在中间,22-37也是指中间的
话),SAS应该不会继续读下去吧?
Ave.
【在 p********a 的大作中提到】 : 如果没有TRUNCOVER,SAS读第一个OBS最后一个变量的时候,读22-37,但是Maple Ave. : 没有16位长,SAS就继续读下一行,把Sylvia读成第一个OBS的STREET的一部分。 : TRUNCOVER就是告诉SAS,最后一个变量,有多长就读多少,不要扯到下一个去。
|
p********a 发帖数: 5352 | 4 SAS will read exactly 16 characters if the field street is in the middle
【在 m*****8 的大作中提到】 : 那如果这件事发生在中间而不是末尾的话(加入Maple Ave在中间,22-37也是指中间的 : 话),SAS应该不会继续读下去吧? : : Ave.
|
m*****8 发帖数: 27 | 5 如果这样的话,所有的column input,不同的observation的变量长度应该一样喽?
【在 p********a 的大作中提到】 : SAS will read exactly 16 characters if the field street is in the middle
|
p********a 发帖数: 5352 | 6 Yes for column input. I am talking about the SAS length, not the visual "non
-blank" length. Here "input street $22-37" defines the length of street is $
16. If it is less than 16 characters, there should be trailing blanks.
Truncover is just the opposite of default option-Flowover. For flowover, if
the reading pointer reaches the end of record AND the length is less than 16
, it will go to the next line.
You can do a test- just put blanks at the end of the street field so it is
16 characters lo
【在 m*****8 的大作中提到】 : 如果这样的话,所有的column input,不同的observation的变量长度应该一样喽?
|