data work.inventory;
input Product_ID $ Instock Price;
datalines;
P001R 12 125.00
P003T 34 40.00
P301M 23 500.00
PC02M 12 100.00
;
data work.inventory2;
input Product_ID $ Outstock;
datalines;
P001R 12
P001R 30
P001R 25
P003T 34
P301M 23
PD02M 50
;
为两个数据集,现用inventory2修改inventory
data work.inventory;
modify work.inventory
work.inventory2;
by Product_Id;
instock = instock + Outstock;
run;
但inventory2中的PD02M和50如何添加到最终的inventory中?