I wrote the original RUNSQL command back in 1989. About a year ago, IBM told me they were shipping a "RUNSQL" CL Command I needed to modify my command name. I thought: Really, after 25 years, you finally ship a CL SQL command and it has to be named "RUNSQL"?
Anyway, just for grins, I migrated my version to RPG IV and rebuilt it this morning.
RUNSQL/RUNSQL SQL('select * from cozweb/cozcust')
This worked fine.
Then I passed the same SQL statement to the IBM RUNSQL command and got the following message:
RUNSQL SQL('select * from cozweb/cozcust') SQL statement not allowed. RUNSQLSTM command failed.
Apparently you can not use the SELECT statement and IBM also uses RUNSQLSTM as the engine. Not to sound like a jerk, but this is really a lame piece of crap! Any 3rd-rate Programmer could have built the IBM version of RUNSQL in 10 minutes using Embedded SQL within RPG IV and the EXECUTE IMMEDIATE statement. How is this an important addition to IBM i?
IBM's RUNSQL CL command is a #FAIL