I have a block of code that is repeated within a DB2 stored procedure. I would like to separate this out into a new procedure that I can call with parameters and have it return a value.
How do I create a procedure to return a value and how do I call this procedure from inside my original procedure?
How about an output parameter in the proc you call from within your original proc? Calling a proc is done through the CALL command. It’s in the manual 😉