You’ve received good advice on interactively determining if a product is on the system. From a program the correct approach to find if a product (or option of a product) is on the system is to use the Retrieve Product Information API. The API approach is great when writing install exits for a product that has dependencies on another product (or option).
It could be that you do not have authority to the command. Try WRKOBJ *ALL/STRSQL. If the command is on your system, this will find it.
If you still do not find it try GO LICPGM. Take option 10 and look for :
5722ST1 *COMPATIBLE DB2 Query Mgr and SQL DevKit
I think that this is the licensed program that contains the command.
It’s quite possible that GO LICPGM won’t work for you. A better chance is WRKLICINF. The product will be 57xxST1 where xx will change for different versions of i5/OS.
If STRSQL doesn’t work (and doesn’t show as unauthorized), then there’s a good chance that the product isn’t installed. If it’s not installed, it’s unlikely that you have a license for it.
Note that REXX can run SQL. Also, iSeries Navigator has a useful Run SQL Scripts function that can do more than STRSQL can.