DATA Step, Macro, Functions and more

ERROR: Function/subroutine CMISS not found

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 99
Accepted Solution

ERROR: Function/subroutine CMISS not found

Why my SAS doesn't have CMISS function?


Accepted Solutions
Solution
‎03-21-2017 02:13 AM
PROC Star
Posts: 1,570

Re: ERROR: Function/subroutine CMISS not found


All Replies
Solution
‎03-21-2017 02:13 AM
PROC Star
Posts: 1,570

Re: ERROR: Function/subroutine CMISS not found

It appeared in version 9.2 I think.

Frequent Contributor
Posts: 99

Re: ERROR: Function/subroutine CMISS not found

I just figured out that the server is running a 9.1 version while my desktop is on 9.3
Super User
Posts: 17,963

Re: ERROR: Function/subroutine CMISS not found

Or you made a mistake somewhere else in the code or usage. 

Post the full code/log and your SAS version. 

Frequent Contributor
Posts: 99

Re: ERROR: Function/subroutine CMISS not found

2142  data txn_contactlesscmiss;
2143      set db2dw.acarddet;
2144      where dTran between '01JAN2017'd and '28FEB2017'd
2145            and (cPOSMode in ('07')
2146                or (cPOSMode in ('90','02')
2147                  and cmiss(cToken, cPvder, idTReq) = 0));
ERROR: Function/subroutine CMISS not found
2148  run;

I think this part of the log file you're looking for.

Super User
Posts: 9,691

Re: ERROR: Function/subroutine CMISS not found


If you have low version sas. there is an alternative way.




data x;
input (a b c) ($);
cards;
w e .
s f d
;
run;

data want;
 set x;
 array x{*} $ _character_;
 n_miss=cmiss(of x{*});
 
 
/*alternative way*/
 _n_miss=0;
 do i=1 to dim(x);
  if missing(x{i}) then _n_miss+1;
 end;
 
 
 if _n_miss=1 then put 'xxx';
run;

proc print;run;

Frequent Contributor
Posts: 99

Re: ERROR: Function/subroutine CMISS not found

Hi Ksharp, thanks for this alternative suggestion!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 181 views
  • 0 likes
  • 4 in conversation