BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
afiqcjohari
Quartz | Level 8

Why my SAS doesn't have CMISS function?

1 ACCEPTED SOLUTION

Accepted Solutions
6 REPLIES 6
afiqcjohari
Quartz | Level 8
I just figured out that the server is running a 9.1 version while my desktop is on 9.3
Reeza
Super User

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

Post the full code/log and your SAS version. 

afiqcjohari
Quartz | Level 8
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.

Ksharp
Super User

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;

afiqcjohari
Quartz | Level 8
Hi Ksharp, thanks for this alternative suggestion!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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