说白了就是当文件中数据长度不够时,SAS如何处理这中情况。
PAD: 当文件中的数据长度不够时,加空格补充。然后指针自动向后移动一列,再次读取。
TRUNCOVER: 当文件中的数据长度不够长时,有多少读多少。不自动换行。如果没这个选项,当定义的长度较长时,容易读错。
MISSOVER: 当文件中的数据长度不够长时,为空。
SCANOVER
causes the INPUT statement to scan the input data records until the character string that is specified in the @'character-string' expression is found.
在input buffer中判断下,是否有@‘’中的字符,有的话进入PDV,没有的话下一条数据。也就是都之前先filter下。
filename phonebk './1.txt'; data _null_; file phonebk; input line $80.; put line; datalines; Jenny's Phone Book Jim Johanson \ Jim wants a scarf for the holidays. Jane Jovalley phone: (213) 555-4820 Jane started growing cabbage in her garden. Her dog's name is Juniper. J.R. Hauptman phone: (49)12 34-56 78-90 J.R. is my brother. ; run; data a; infile phonebk pad; input name $20. phone $32.; put phone=; run;
data a; infile phonebk truncover; input name $40. phone $32.; put phone=; run;
data a; infile phonebk missover; input name $40. phone $32.; put phone=; run;