I was provided 2 files that appears to be an export of a DB2 table. I do not know the source system type or OS. I was given a layout file (contents below) and a datafile (12GB) that appears to have been created with the UNLOAD command, based on the filename. This datafile has a .TXT extension, however it is not human readable. The "file" command returns type: data
I am trying to load the data into a table on a DB2 11.5.9 database, but multiple errors occur when I try different syntaxes, currently stuck on
[db2inst1@rhel-db2-01 ~]$ db2 "LOAD INDDN SYSREC EBCDIC CCSID(37,65534,65534) FORMAT SPANNED YES INTO TABLE PC8CAMPP.DOC_PAGE_IMAGE (IMAGE_ID POSITION(1:6) DECIMAL, PAGE_IMAGE POSITION(7:*) BLOB) NONRECOVERABLE FROM './CCS_UNLOAD_DOC_PAGE_IMAGE_V.TXT'; "
SQL0104N An unexpected token "INDDN" was found following "LOAD". Expected
tokens may include: "QUERY". SQLSTATE=42601
I am looking for advise on how I can load this data.
Layout File Contents:
LOAD DATA INDDN SYSREC
EBCDIC CCSID(37,65534,65534)
FORMAT SPANNED YES
INTO TABLE
PC8CAMPP.DOC_PAGE_IMAGE
(IMAGE_ID POSITION(1:6) DECIMAL
,PAGE_IMAGE POSITION(7:*) BLOB
)
[db2inst1@rhel-db2-01 ~]$ db2level
DB21085I This instance or install (instance name, where applicable:
"db2inst1") uses "64" bits and DB2 code release "SQL11059" with level
identifier "060A010F".
Informational tokens are "DB2 v11.5.9.0", "s2310270807", "DYN2310270807AMD64",
and Fix Pack "0".
Product is installed at "/opt/ibm/db2/V11.5".
------------------------------
Ernie Dipko
------------------------------