Search notes:

SAS programming: operators

Comparison with colons

data tq84_data_in;

  input txt $3.;

datalines;
A
AB
ABC
D
DE
DEF
G
GH
GHI
run;


data tq84_data_out;
  set tq84_data_in;
 
  if txt =    'A'         then A_eq_A           = "txt = 'A'";
                          else A_eq_A           = "";
 
  if txt =:   'A'         then A_eq_colon_A     = "txt =: 'A'";
                          else A_eq_colon_A     = "";

  if txt =:   'AB'        then A_eq_colon_AB    = "txt =: 'AB'";
                          else A_eq_colon_AB    = "";

  if txt >=:  'AB'        then A_gt_colon_AB    = "txt >: 'AB'";
                          else A_gt_colon_AB    = "";

  if txt in  ('AB', 'DE') then A_in_AB_DE       = "txt in ('AB', 'DE')";
                          else A_in_AB_DE       = "";

  if txt in: ('AB', 'DE') then A_in_colon_AB_DE = "txt in: ('AB', 'DE')";
                          else A_in_colon_AB_DE = "";
 
run;
Github repository about-SAS, path: /programming/operators/comparison-colon.sas

See also

SAS Programming Language

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...', 1759399355, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/operators/index(79): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78