How to get return value from pl sql procedure and assign it to variable?
You can create it like this:

CREATE OR REPLACE PROCEDURE procedurename(param1 NUMBER, param2 varchar(20), returnvalue OUT NUMBER);
IS
BEGIN
    ... your code
END;


And then use it like this:

returnvalue NUMBER;
procedurename(0, 'xxx', returnvalue);
dbms_output.putline(returnvalue);


You can look at CREATE PROCEDURE  documentation at Oracle website.