D******n 发帖数: 2836 | 1 is it true that sas automatically jump over a blank line(s) when it reads a
file in a data step?
I actually want the reading stop at a blank line....tnnd... |
A*******s 发帖数: 3942 | 2 应该可以用missover去读这个blank line,然后用if判断是不是所以variable都是
missing
a
【在 D******n 的大作中提到】 : is it true that sas automatically jump over a blank line(s) when it reads a : file in a data step? : I actually want the reading stop at a blank line....tnnd...
|
m*********n 发帖数: 413 | 3 you can use two input statement. in the first input statement, read the
first and another column (may 20th?) in the row.
input @1 tmp1 $1. @20 tmp2 $1. ..........;
if both are empty, do nothing ( conclude this line is empty)
otherwise, use the second input statement to read the variables you want.
I haven't touch input statement for a while and not sure whether the syntax
is correct. but make sure let SAS hold the current row in the first input
statement.
【在 A*******s 的大作中提到】 : 应该可以用missover去读这个blank line,然后用if判断是不是所以variable都是 : missing : : a
|
m*********n 发帖数: 413 | 4 I think you can find a example in SAS help since this is quite a common use
of the INPUT statement
syntax
【在 m*********n 的大作中提到】 : you can use two input statement. in the first input statement, read the : first and another column (may 20th?) in the row. : input @1 tmp1 $1. @20 tmp2 $1. ..........; : if both are empty, do nothing ( conclude this line is empty) : otherwise, use the second input statement to read the variables you want. : I haven't touch input statement for a while and not sure whether the syntax : is correct. but make sure let SAS hold the current row in the first input : statement.
|