开发者

What does "Attempt to change the value of the constant" mean in SAS?

开发者 https://www.devze.com 2023-02-19 17:27 出处:网络
data 开发者_如何学编程_null_; call missing(\'VAR1\', \'VAR2\'); run; results in: ERROR 135-185: Attempt to change the value of the constant \'VAR1\' in the MISSING subroutine call.
data 开发者_如何学编程_null_;
    call missing('VAR1', 'VAR2');
run;

results in:

ERROR 135-185: Attempt to change the value of the constant 'VAR1' in the MISSING subroutine call.

What's going on? Answering my own question below.


The correct syntax is this:

data _null_;
    call missing(VAR1, VAR2);
run;

The MISSING call routine takes variable names as parameters, not character constants containing variable names. Doh!

Answering my own question in order to import this error message into the internet, as I couldn't find any reference to it previously.

0

精彩评论

暂无评论...
验证码 换一张
取 消