This is my thought logic for my if statements in SAS. It is not running because I was told I am using it improperly. Can someone provide assistance please?
ERROR 180-322: Statement is not valid or it is used out of proper order.
data tmp_final_tab;
merge data.final_alerts_ramts(in=a) data.final_alerts_repamts(in=b) data.final_alerts_passthru(in=c)
data.final_alerts_wires(in=d) data.final_alerts_low_volume(in=e) data.final_alerts_bhvr(in=f);
by clnt_no;
if a;
if pamt_activity_cr >= &rnd_pct_atl then atl_inda1 = 1; else atl_inda1 = 0;
if pamt_activity_dr >= &rnd_pct_atl then atl_inda2 = 1; else atl_inda2 = 0;
if b;
if pamt_activity_cr >= &rnd_pct_atl then atl_indb1 = 1; else atl_indb1 = 0;
if pamt_activity_dr >= &rnd_pct_atl then atl_indb2 = 1; else atl_indb2 = 0;
if c;
if (ptam/total_Amount) * 100 >= &pt_pct_atl then atl_indc = 1; else atl_indc = 0;
if d;
if tot_amt_wire >= &hrc_wire_amt_atl then atl_indd = 1; else atl_indd1 = 0;
if tot_in_amt >= &wire_in_cnt_amt_atl then atl_indd2 = 1; else atl_indd2 = 0;
if tot_out_amt >= &wire_out_cnt_amt_atl then atl_indd3 = 1; else atl indd3 = 0;
if e;
if tot_amt_lv >= &lv_amt_atl then atl_ind = 1; else atl_ind = 0;
if f;
if tot_amt_bhvr >= &bhvr_w_hist_atl then atl_ind = 1; else atl_ind = 0;
if a or b or c or d or e or f
if (atl_inda + atl_indb + atl_indc + atl_indd + atl_inde + atl_indf > 0) then btl_ind = 0; else btl_ind = 1;
run;
Aucun commentaire:
Enregistrer un commentaire