DATA Step, Macro, Functions and more

Overrule RETURN CODE proc sql

Reply
Frequent Contributor
Posts: 89

Overrule RETURN CODE proc sql

dear all,
to use an update/insert in SAS SQL you have to specify UNDO_POLICY=OPTIONAL or NONE
But because of this i get a WARNING in the log and on mainframe this
gives a RETURN CODE 4!
HoW can i push this RC to 0 (zero) in the SQL or with an extra data step to tell OPC the job is ok??

Regards,
Herman
Super Contributor
Posts: 474

Re: Overrule RETURN CODE proc sql

Force the system macro variable SYSCC to the value you want.

Ideally you should save its value BEFORE executing the SAS SQL then restore it after.

%let _SYSCC=&SYSCC; * save SYSCC;

...

%let SYSCC=&_SYSCC;

Be aware that this will mask any type of error occurred between the two %let.

Check the online doc: http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/tw3514-syscc-var.htm

Cheers from Portugal.

Daniel Santos @ www.cgd.pt
Ask a Question
Discussion stats
  • 1 reply
  • 128 views
  • 0 likes
  • 2 in conversation