I have make a tool that solve the problem of variables in RUNSQLSTM. You can find it at http://jplamontre.free.fr/AS400/EXECSQL.htm
usage sample :
1) put in a source member the sql
delete from &target/custom where company = ‘&cmp’
2) execute it
execsql … ((target TheLib) (cmp 6))
The tool is in text format (1 cmd, 1 clp, 1 rpgle). If you have difficulties to copy the code to the as, look at the samples at http://jplamontre.free.fr/AS400/TrucAstuceAs400.htm#Copie%20de%20code (sorry, comments are only in french, but command samples are in AS400)
Send me back comments on using my web pages, I never need to use my tolls from my web pa
You can’t pass parameters to RUNSQLSTM. Period.
If you need parameters passed into an SQL statement, use STRQMQRY instead of RUNSQLSTM.