IBM Support

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

Question & Answer


Question

Received an SQL7008 error when attempting to INSERT data into an AS/400 table. "REXX 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

[{"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database Objects\/Config - Tables","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.5;9.1;8","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

25186;L11;000

Document Information

Modified date:
16 June 2018

UID

swg21007161