问题描述
在增强的编辑器中,着色可能会给您一个提示.但是,在大型机上,我认为编辑器中没有任何东西可以帮助您.
In the enhanced editor, the coloring might give you a hint. However, on the mainframe I don't believe there is anything, in the editor, that will help you.
我用
OPTIONS OBS=0 noreplace;
obs=0 选项指定从输入中读取 0 个观测值dataset 和 NOREPLACE 告诉 SAS 不要用其中一个覆盖现有的 SAS 数据集一样的名字.如果您正在创建一个新的数据集,它将使用所有属性创建,但有 0 个观察值.(如果需要,请务必将选项重置为 Options Obs=max replace ; 当没有发现更多语法错误时).
The obs=0 option specifies that 0 observarions are read in from the inputdataset and NOREPLACE tells SAS not to overwite an existing SAS dataset with one of thesame name. If you are creating a new datastet, it will be created with all the attributes,but with 0 observations. (Be sure to reset the options, if needed, to Options Obs=max replace ; when no more syntax errors are found).
我会对任何其他技术感兴趣.谢谢
I'd be interested in any other techniques.Thanks
关于选项的解释来自 这里.
推荐答案
我在运行语句中使用了取消选项.它将检查数据步骤的语法,然后终止它而不实际执行它.它是类似于 proc sql 中的 noexec
选项的数据步骤.
I use the cancel option on the run statement. It will check the syntax of the data step then terminate it without actually executing it. It's the data step analog to the noexec
option in proc sql.
data something;
<stuff here>
run cancel;
这篇关于在 SAS 中,什么是捕捉语法错误的好技术/选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!