由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - blank lines /sas/data step
相关主题
WHICH ONE IS CORRECT?Question: Emacs + ESS for SAS
问大家一个SAS问题(其实我找到答案了,算考考大家吧)学SAS之前需要先懂得SQL嘛?
[合集] 请教一个percentile的问题 (SAS)SAS question
syntax errorsON-SITE面试要进行SAS EXAM,请问该如何准备?
哪位能推荐一本SPSS的书,面试要问到SPSSSAS advanced 真题中请教一题
请教2个sas base问题SUDAAN & SAS
包子问两个sas和spss数据转换的问题这两天学习SAS的一点题外感想
any free editors supporting SAS syntax?请教SAS base 70题中的55题
相关话题的讨论汇总
话题: sas话题: input话题: blank话题: statement话题: step
进入Statistics版参与讨论
1 (共1页)
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.

1 (共1页)
进入Statistics版参与讨论
相关主题
请教SAS base 70题中的55题哪位能推荐一本SPSS的书,面试要问到SPSS
有什么sas log的viewer吗请教2个sas base问题
sas adv 63题 第11包子问两个sas和spss数据转换的问题
where is error in SASany free editors supporting SAS syntax?
WHICH ONE IS CORRECT?Question: Emacs + ESS for SAS
问大家一个SAS问题(其实我找到答案了,算考考大家吧)学SAS之前需要先懂得SQL嘛?
[合集] 请教一个percentile的问题 (SAS)SAS question
syntax errorsON-SITE面试要进行SAS EXAM,请问该如何准备?
相关话题的讨论汇总
话题: sas话题: input话题: blank话题: statement话题: step