Search notes:

SAS programming, function missing

missing() can be used to check whether the value of a variable is absent (that is: missing):
%macro put_data_type_and_missing(var);

  data_type = vtype(&var);
  is_missing = missing(&var);
  
  put "&var - data type: " data_type ", missing: " is_missing;

%mend;

data _null_;

  c1 = 'fourty two'; /* Create a non-missing character variable */
  c2 = ' ';          /* Create a missing character variable (note the space!) */
  n1 = 42;           /* Create a non-missing numeric variable */
  n2 = .;            /* Create a missing numeric variable (note the dot) */
  
  %put_data_type_and_missing(c1); /*  c1 - data type: C , missing: 0 */
  %put_data_type_and_missing(c2); /*  c2 - data type: C , missing: 1 */
  %put_data_type_and_missing(n1); /*  n1 - data type: N , missing: 0 */
  %put_data_type_and_missing(n2); /*  n2 - data type: N , missing: 1 */
  
run;
Github repository about-SAS, path: /programming/functions/missing.sas

See also

functions
SAS: proc SQL - count missing values

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Companie...', 1759408079, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/functions/missing(62): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78