First of all, you need to terminate each PL/SQL block by forward slash (a single procedure definition is a PL/SQL block too):
Otherwise Oracle would try to process the CALL command, which actually tests the newly created procedure, as part of the procedure.
If you're getting an error on the
UPDATE statement, then perhaps the table doesn't exist or you don't have sufficient privileges. I was able to create this procedure using a name of existing table without errors.
Two more points:
1) It is a bad idea to commit in a stored procedure. It should always be the caller's response to start and end an transaction. Otherwise it can be difficult to reuse the stored procedures to form larger transactions.
2) The
WHEN OTHERS clause is horrible. It is the equivalent of an empty catch clause in
Java. If an error occurs, the transaction is silently rolled back and the exception is swallowed.
You should not have the rollback there anyway (see the previous point), so the entire
EXCEPTION clause should go away. Let the caller handle the errors.
If this is a sample code from a book, then don't use that book. It really is not good and will teach you wrong things. Oracle actually has quite good documentation, including introductory ("2 day") guides, eg.
Oracle Database 2 Day Developer's Guide.