Wednesday, 24 February 2016

ERRBUF and RETCODE In Concurrent Program

For each Concurrent program we must use mandatory parameters : ERRBUF and RETCODE.

ERRBUF: It return the error message. 
For you program if you get any error in exception block you can assign the error message to this parameter. 
This error message you can see after concurrent program run go to details button it will open details in that Completion Text filed will show your errbuf.

RETCODE: This parameter returns the status of the concurrent program.
0- Success --Completed
1- Warning -- Yellow color
2- Error -- Red

These parameters we call as a first parameters for the program.

Ex:
Create procedure  CProgram(ERRBUF out varchar2, RETCODE  out varchar2, person_id in NUmber)
as
begin
<Declaration Goes  Here>
begin
<Code Block1 Here>

exception
when no_data_found then
retcode := 1;
errbuf:= 'RetCode : Warning';
end;
...
<Code Block2 Here>
...
retcode:= 0;
commit;
exception
when others then

retcode := 2;

errbuf:= 'errbuf:= 'RetCode : Error';

end;

No comments:

Post a Comment