想将master中,id=2、3、4的数据更新,log中显示已经更新,但实际结果没有。
十分感谢!!!
NOTE: There were 5 observations read from the data set WORK.TRANSACTION.
NOTE: The data set WORK.MASTER has been updated. There were 3 observations rewritten, 2 observations added and 0
observations deleted.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
- DATA master(index=(id));
- INPUT id value;
- DATALINES;
- 1 10
- 2 20
- 3 30
- 4 40
- 5 50
- ;
- RUN;
- DATA transaction;
- INPUT id value;
- DATALINES;
- 2 12
- 3 13
- 4 14
- 6 16
- 7 17
- ;
- RUN;
- data master;
- set transaction;
- modify master key=id;
- select (_iorc_);
- when (%sysrc(_sok)) do;
- replace;
- end;
- when (%sysrc(_dsenom)) do;
- _error_=0;
- output;
- end;
- end;
- run;
- proc print data=master;run;