Dear Kumar
It has been normal in my experience for DB2 for i engine to allocate a lot of run-time temp storage (in the range of single digit GB) while it runs SQL statements/Queries that handle a lot of data rows - especially when useful indexes are not present for DB2 engine to utilize. But when your SQL statement(s) finishes, the temp storage should disappear. If not, then it's a bad sign.
You mentioned your SQL handled 15 fields but did not mention the size of each field and how many rows were processed. Knowing these info would help you see if large GB run-time temp storage size is sensible or not. To get these info, you can dump the plan cache with filters for the relevant date+time, user that runs the job(s), and tables being accessed to help you identify your SQL job(s) and then display Visual Explain of those relevant SQL statements of yours. The info in Visual Explain should give you some idea about how much data is being accessed here.
For each field being updated, did you update all rows in the table(s) or not ? If not all rows (and assuming you used WHERE clause for UPDATE), did you have useful index(es) for the SQL statement? If not, this can contribute to the larger allocated temp storage (but I cannot not be precise how much as this matter is not easy to know without investing more time and effort browsing Plan Cache for relevant info) due to high possibility of table scan operation rather than index probe. Having proper indexes for WHERE, ORDER BY, GROUP BY, and join operations can help reduce run-time temp storage to some degree when large number of processed rows are involved. Displaying Visual Explain of all SQL statements involved will give you more info on Index Advisor.
>>>> Note: We are repeatedly invoking this above function for every field being updated via the API call <<<<
Did you run the update for one table field at a time? If you update more than one field at a time, the run-time temp storage can possibly be larger than the case when you update just one field at a time.
One last factor that can help reduce run time temp storage allocation is in a principle of "writing the SQL statement(s) that tries to eliminate as many irrelevant rows as early as possible before processing the relevant ones". This deals in detail of the each statement itself.
These are influencing factors I can think of right now.
#SQL