Help using Base SAS procedures

SAS ACCESS (ORACLE) and data inserts/updates

Reply
N/A
Posts: 0

SAS ACCESS (ORACLE) and data inserts/updates

Hi,
We have a set of programs that take raw data from Oracle tables, perform calculations, then insert the data into Oracle tables that hold the derived data. The derived data processed into the final Oracle table can be either inserted or updated (under 100 rows of output data is produced).

I have got this code to work:

options debug=DBMS_REREAD_EXPOSURE_ON;

libname prodDB oracle ......;
data prodDB.a;
modify prodDB.a b;
by x y;

select (_iorc_);
when (%sysrc(_dsenmr))
do;
output prodDB.a;
_error_ = 0;
end;
when (%sysrc(_sok))
do;
replace prodDB.a;
end;
otherwise
do;
put 'unexpected error condition _iorc_= ' _iorc_;
put _all_;
_error_= 0;
abort Abend;
end;
end;
run;

Is there anyway of doing this without the debug=DBMS_REREAD_EXPOSURE_ON option or hand coding insert/update statements? If there is not - what is the longevity of the debug=DBMS_REREAD_EXPOSURE_ON option in future releases of SAS and what are the problems with using it?

Regards,
Dave Boleyn
Ask a Question
Discussion stats
  • 0 replies
  • 102 views
  • 0 likes
  • 1 in conversation