Start of change

SQL ILE RPG precompiler change for BOOLEAN support

In IBM® i 7.5, an embedded SQL statement which references an RPG indicator host variable may have different behavior than on previous releases.

Prior to IBM i 7.5, RPG indicator host variables were partially supported within Db2® for i. When an embedded SQL statement referenced an RPG indicator host variable, the RPG precompiler generated a character of length 1 within SQL. This allowed the RPG indicator host variable to be used within SQL anywhere a character host variable was allowed, even though the RPG indicator data type was not supported within SQL.

In IBM i 7.5, support for a native SQL BOOLEAN data type was added to Db2 for i. Since the BOOLEAN data type matched the RPG indicator data type, the RPG precompiler was changed to generate an RPG indicator host variable as a BOOLEAN. Because of this enhancement, an RPG program with an embedded SQL statement which references an RPG indicator host variable may have different behavior when the SQL program is recompiled on IBM i 7.5. An embedded INSERT, UPDATE, MERGE, SET, or VALUES INTO SQL statement may have different behavior when an RPG indicator host variable is assigned into a character variable or character column. Prior to IBM i 7.5, the value '0' or '1' would be assigned, but in IBM i 7.5, the value 'FALSE' or 'TRUE ' is assigned. This may cause an SQL0404 message (SQLCODE -404) or SQL0303 message (SQLCODE -303) when an RPG indicator host variable is assigned into a character variable or character column.

Existing programs which are not recompiled do not change behavior.

If the previous behavior is required, the TGTRLS(*PRV | V7R3M0 | V7R4M0) parameter can be used on the Create SQL ILE RPG Object (CRTSQLRPGI) *CMD.

For additional information on the SQL BOOLEAN data type, refer to https://www.ibm.com/support/pages/node/6575531.

End of change