IBM Support

An IBM SQL/400 Program with Embedded SQL Statements Does Nothing

Technote (troubleshooting)


This document describes what occurs when a program is compiled with commitment control and the file is not journaled.

Resolving the problem

The most common cause for this problem is that the program was compiled to run with commitment control. Running with commitment control requires the files accessed through IBM SQL/400 to be journaled. The joblog for the job (DSPJOBLOG) confirms this is the problem with a message SQL7008 rc3.

To correct the problem, specify *NONE for the COMMIT parameter of the CRTSQLxxx, where xxx is the high-level language. Or, journal the files (CRTJRNRCV, CRTJRN, STRJRNPF) referenced by the SQL statements. If using the last method, add the COMMIT and ROLLBACK SQL statements to the program.

The programmer is responsible for checking the SQLCODE to verify that an SQL statement completed. The program should check the SQLCODE after each SQL statement and handle one that indicates a failure occurred. If this is not done, the application continues running as if the SQL statement completed normally.

Cross reference information
Segment Product Component Platform Version Edition
Operating System IBM i 7.1
Operating System IBM i 6.1

Historical Number


Document information

More support for: IBM i
DB2 for IBM i

Software version: 5.2.0, 5.3.0, 5.3.5, 5.4.0, 5.4.5, 6.1, 6.1.0, 6.1.1, 7.1, 7.1.0

Operating system(s): IBM i

Reference #: N1013907

Modified date: 05 October 2012