The fewer number of times you need to make calls across the network the better your program will perform.
Try to read each data item only once. The more times you access the same data the worse performance will be.
Let SQL do the work... DB2 can optimize SQL better than you can optimize your programming language of choice.
SQL is a set-based language. Each SQL statement can operate on multiple rows of data at once. And joins are more efficient than opening multiple cursors and performing "master file" processing logic on them.
Even though DB2 no longer automatically degrades non-matching predicates to Stage 2, it is still a best practice to match the data type and length for columns and host variables that participate in predicates.
Without proper documentation application maintenance becomes difficult... especially if you used any SQL tuning tricks/techniques.
If you don't check for an error you may be processing with bad, incorrect, or missing data.
If you do not examine the access paths formulated by the DB2 optimizer for your SQL then how do you know how efficient (or not) your code is (or will be).