|Where allowed to run: All environments (*ALL)
Deprecated command. Use the SQL iQuery RUNIQRY command instead.
The RUNSQL (CLSQL) command provides support similar to the IBM i V7R1 RUNSQL command, however CLSQL runs on all ILE versions of OS/400, IBM i5/OS and IBM i. In addition, it can be compiled back to V3R1 if needed. CLSQL was originally named RUNSQL and written and copyrighted by Bob Cozzi back in 1990. It was repackaged as "SQL Lite" during most of the 1990s and withdrawn from market in 2002. Recently IBM included a CL command named "RUNSQL" with an IBM i v7r1 TR (technology refresh) that only works on V7R1 and later. This caused problems for thousands of users who owned SQL Lite and/or wrote their own RUNSQL command. During 2014, Cozzi Productions, Inc. the owner of SQL Lite and author of the original RUNSQL command, introduced a new SQL product named, "SQL iQuery". This product includes the RUNIQRY and RUNIQRYF commands that provide more advanced capbilities than the SQL Lite package and IBM's RUNSQL command. Visit www.sqliQuery.com for details on the SQL iQuery package.
|Non-Select SQL Stmt to run
|Required, Positional 1
Specifies the SQL statement to run. Any non-SELECT statement is usually supported. For support of the SELECT statement, you need to order Licensed Program 2COZ-IQ3 from Cozzi Productions, Inc. www.SQLiQuery.com
This is a required parameter.
Example 1: Simple Command Example
CLSQL SQL('DELETE FROM CUSTMAST WHERE DLTCODE = ''D''')
This command removes all records from CUSTMAST that have a delete code equal to the letter D.