This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
Having conditional code inclusion based upon TGTRLS would only account for a small portion of the problem you have identified. There are many IBM i services that are introduced and enhanced by PTFs during the life of a release. A complete solution would need to account for those changes as well.
For an alternate solution that is available today and was introduced in IBM i 7.2, consider using the QSYS2.SERVICES_INFO table to solve the problem. It lists every service and the database PTF group level of the service on the IBM i where the table is located. By querying this table along with using the Db2 for i PTF Group information from the IBM i Services wiki pages (https://www.ibm.com/support/pages/node/1119123), you should be able to craft a solution that identifies the level of code that is available where a RUNSQLSTM command is being run.