data stock(index=(partno));
input PARTNO $ DESC $ INSTOCK @17 RECDATE date7. @25 PRICE;
format recdate date7.;
datalines;
K89R seal 34 27jul95 245.00
M4J7 sander 98 20jun95 45.88
LK43 filter 121 19may96 10.99
MN21 brace 43 10aug96 27.87
BC85 clamp 80 16aug96 9.55
NCF3 valve 198 20mar96 24.50
KJ66 cutter 6 18jun96 19.77
UYN7 rod 211 09sep96 11.55
JD03 switch 383 09jan97 13.99
BV1E timer 26 03jan97 34.50
;run;
data newp;
input TOOL_OBS NEWP;
datalines;
1 251.00
4 30.00
6 25.75
10 35.00
;
data stock;
set newp;
modify stock point=tool_obs
nobs=max_obs;
if _error_=1 then
do;
put 'ERROR occurred for TOOL_OBS=' tool_obs /
'during DATA step iteration' _n_ /
'TOOL_OBS value may be out of range.';
_error_=0;
stop;
end;
PRICE=newp;
run;
以上一个是stock数据集,一个是newp数据集,然后对stock数据集进行修改,这是整个过程,我的疑问在于其中后面那个部分: nobs=max_obs;
if _error_=1 then
do;
put 'ERROR occurred for TOOL_OBS=' tool_obs /
'during DATA step iteration' _n_ /
'TOOL_OBS value may be out of range.';
_error_=0;
stop;
end;
这一部分是否是多余的,因为就算不用这段编程,依然能达到修改stock数据集的目的,,,求各位大神指教!!