Look at the error - it's not even hinting that you are creating a temporary table never mind incorrectly, so what you are really asking is "how can I solve this error".
I haven't got DB2 (or Oracle) to hand at the moment so I am going to walk you through a method of solving the problem for yourself ...
1. Have a look at the line
SET PARAMS_VALUE = (select replace(replace(replace(replace(tmpname, '''', ''),'{',''), '}' , ''),'=>' , '=') from SYSIBM.SYSDUMMY1);
Try replacing that with a hard-coded value and run your SP. If it no longer errors then you need to carefully examine that line of code and correct the problem - I personally don't like escaping single quotes and prefer to use CHR(39).
2. If it doesn't error ... Edit your SP and comment out (or remove to a safe place) everything other than the DECLARE cursor lines. Run it. If it errors then carefully check the
syntax of the code you have left.
2. If it didn't error then start adding bits of the code back in - keep the size of the chunks of code reasonably small to make it easier to locate the error when it does occur
Basically put bits back a piece at a time, run the SP each time. When it falls over you know it was the last thing that you put back that caused the problem.