09-25-2014 04:20 PM
Can someone help?
the do loop is in macro procedure.
without %do ...%end, the output was genrated.
when i add %do...%end..., the log shows the oberservations were created. but the output were not sent into the table.
%do i=0 %to &ndays;
%let endrange=%eval(&startdate +&i);
set fsc_cash_flow_stg2_count_ck1 end=eor;
proc sort data=fsc_cash_flow_stg2_alert;
if first.party_number then
if upcase(transaction_cdi_desc)='debit' then
if last.party_number and (totaldebitcount+totalcreditcount)>=3 then
09-25-2014 04:34 PM
Not a complete solution by any means, but here are two issues you will need to address.
(1) Your formula for beginning of a range is missing an ampersand. Using %EVAL((startdate should be generating an error.
(2) Even without a macro loop, you are getting the wrong answer if you look for the UPCASE function to return 'debit'. It could return 'DEBIT', but it could never return 'debit'.
09-25-2014 04:39 PM
Your did program marvelous for 30 times. Every step a new selection on the same datasets and a the end you have selected that much (dropped records) not keeping any data.
There is no error. Perhaps it did not what you wanted, it did what you have coded.
09-25-2014 04:47 PM
Also you might consider changing this:
otherwise each loop overwrites the previous version of the data set and you'll only get output for the value of &ndays. (which isn't defined where the value comes from, so that could be another place to look for issues)