Search notes:

SAS: proc sql - feedback

The feedback option writes into the SAS log, what an SQL statement is transformed to.
data dat;
  id  =  42;
  val = 'Hello world';
  output;
run;

%macro tq84_gt_twenty_four(x);
  &x gt 42
%mend  tq84_gt_twenty_four;

%let tq84_val=xyz;

proc sql feedback;
  select
    *
  from
    dat
  where
    %tq84_gt_twenty_four(id)
    &
    val <> "&tq84_val"
  ;
/*
    The feedback options writes into the log file
    what the sql statement is actually turned into:

         select DAT.id, DAT.val
                from WORK.DAT
               where (DAT.id > 42) and (DAT.val not = 'xyz');

*/
quit;
Github repository about-SAS, path: /programming/proc/sql/feedback/basic.sas

See also

Option sastrace=',,,d'
proc sql

Index