data late;
set sasuser.billed end=final;
if datedue<=today()-30 then
do;
n+1;
output;
end;
if final and n then call execute('%overdue');
run;[/code:1i165iva]
和
[code:1i165iva]%macro overdue;
proc print data=late;
title "Overdue Accounts As of &sysdate";
run;
%mend overdue;
data late;
set sasuser.billed end=final;
if datedue<=today()-30 then
do;
n+1;
output;
end;
if final and n then %overdue; /* or use "do.. end" */
run;[/code:1i165iva]