Hello friends, please help me to understand this code, this is not my code, its existing code
I am testing code where one dataset "test" resolving with 3 observation
date file_name
20Jan16 test_file_20160120.txt
19Jan16 test_file_20160119.txt
18Jan16 test_file_20160118.txt
Now after this dataset (test) created, below code is running and its giving only 1 observation, i really don't know why it is resolving to one but i am expecting it should has 3 observation
%macro test (x_date);
%let store_x_date="null";
data test_2;
retain stop_ind; if _N_ = 1 then stop_ind = 0; set test; by DESCENDING DATE; if last.DATE = 1 then do; if stop_ind = 0 then do; output; Author_DATE = put(DATE, date.); call symput("&x_date.",Author_DATE); end; stop_ind = 1; end; if stop_ind = 0 then output; run;
%mend;
%test (store_x_date);
Thank you
... View more