Midrange News for the IBM i Community

Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
has no ratings.
Published: 19 Jun 2013
Revised: 16 Aug 2013 - 2015 days ago
Last viewed on: 21 Feb 2019 (8232 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

IBM i RUNSQL CL Command Published by: Bob Cozzi on 19 Jun 2013 view comments(9)

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

Return to midrangenews.com home page.
Sort Ascend | Descend