IBM Support

Received an SQL7008 error when attempting to INSERT data into an AS/400 table. "REXX variable '<variable>' contains inconsistent data".

Technote (FAQ)


Question

Received an SQL7008 error when attempting to INSERT data into an AS/400 table. "REXX variable '<variable>' contains inconsistent data". This problem is resolved by enabling Journaling for the database on the AS/400.

Cause

Journaling was not enabled on the AS/400. OS/400 V4R4M0 added support for a new autocommit mode so files used by applications will need to be journaled.
If you have existing libraries/databases that were created through standard OS/400 commands (like CRTLIB or CRTPF), journalling is not enabled by default.


Answer

This problem is resolved by enabling Journaling for the database on the AS/400.

Example:


1. Create a journal receiver in a library of your choice using the Create Journal Receiver (CRTJRNRCV) command:

CRTJRNRCV JRNRCV(lib/jrnrcvname)
THRESHOLD(100000)
TEXT('Description text')

2. Create a journal for your file by using the Create Journal (CRTJRN) command:

CRTJRN JRN(lib/jrnname)
JRNRCV(lib/jrnrcvname)
MNGRCV(*SYSTEM) DLTRCV(*YES)
TEXT('Description text')

3. Start journaling your physical file by using the Start Journal Physical File (STRJRNPF) command:

STRJRNPF FILE(lib/filename)
JRN(lib/jrnname)
OMTJRNE(*OPNCLO)

For more details about setting up journals for source tables, refer to http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.swg.im.iis.db.repl.iseries.doc/topics/iiyrsisesetupjrnalssrc.html

Historical Number

25186
L11
000

Document information

More support for: DB2 for Linux, UNIX and Windows
Database Objects/Config - Tables

Software version: 8, 9.1, 9.5

Operating system(s): Windows

Reference #: 1007161

Modified date: 18 November 2015