It is a bad idea to use "select *" in any application program, even if the DB2 optimizer converts it to "select 1" or something similar.
In the old days, the DB2 optimizer did not convert "select *" to "select 1" in a "where exists" or similar query, so you ended up having DB2 actually process all those columns in the sub-query, which was not very efficient. In fact, there were serious debates at the time about whether "select '1' " was more efficient than "select 1" or "select <primary-key-column>". That was awhile ago.