I'm not great with macros but I have a problem. How do I correct a 'divide by zero' when the values in question are macro variables?
Here is a chunk of my code:
select unique count(*) into :d_rec_count from worka;
select unique count(*) into :d_clo_count from worka where resolvedDT ne .;
select unique &d_clo_count/&d_rec_count into :d_clo_percent from worka;
but when the divisor in the last 'select' is 0 (zero), I get a message 'No rows were selected' and the value of &d_clo_percent is incorrect.
I think what I need to do is check that the value of the divisor is zero and set d_clo_percent to 0 (zero) somehow.