Testing if temp table exists in iSeries SQL stored procedure
Add WITH REPLACE to the end of your DECLARE GLOBAL TEMPORARY TABLE statement.  This will create your table in QTEMP regardless of whether one already exists or not.