This section presents specification examples of the column structure information file.
CREATE TABLE T1 (COL1 INTEGER,COL2 DATE,COL3 CHAR(10));
This example uses a sequence generator (USER01.SEQ_B01) to generate sequence numbers and then stores the sequence numbers in COL03.
CREATE TABLE T1 (COL1 INTEGER,
COL2 CHAR(10),
COL3 DECIMAL(10),
COL4 INTEGER);
1,ABC,2500
2,DEF,30000
3,GHI,10
:
COL1
COL2
COL4
*adddata*
COL3,sequence=(USER01.SEQ_B01)
CREATE TABLE T1 (COL1 INTEGER,COL2 DATE,COL3 CHAR(10));
This example loads table T1's unload data to table T2, where T1 has SGMLTEXT columns including BLOB parameter data and T2 has BLOB columns. The table definitions show only the row name and data type specification sections; the other sections are omitted.
T1(C1 INT, C2 SGMLTEXT, C3 BLOB)
T2(C4 BLOB, C5 INT, C6 SGMLTEXT)
C5
C6, func = (SGMLTEXT, param = blob)
C4
T1(C1 INT, C2 SGMLTEXT, C3 BLOB)
T2(C4 INT, C5 BLOB)
C4
*skipdata*, type = blobprm
C5
T1(C1 INT, C2 BLOB)
T2(C4 INT, C5 BLOB, C6 SGMLTEXT)
C4
C5
This example replaces LOB attribute data (C2) in T1's SGMLTEXT type column to T2's LOB column (C6) and T1's LOB column data (C3) to the LOB attribute (C5) of the SGMLTEXT type column in T2.
T1(C1 INT, C2 SGMLTEXT, C3 BLOB)
T2(C4 INT, C5 SGMLTEXT, C6 BLOB)
C4
C6, type=blobprm
C5, func=(sgmltext, param=blob)
This example loads the LOB attribute data (C2) from an SGMLTEXT type column to the BINARY attribute (C5) of an SGMLBIN type column and loads data (C3) from a LOB column to a BINARY type column (C6).
T1(C1 INT, C2 SGMLTEXT, C3 BLOB)
T2(C4 INT, C5 SGMLBIN, C6 BINARY)
C4 ................................................1
C5, func=(sgmlbin, param=binary, type=blobprm) ....2
C6, type=blob .....................................3
This example expands the definition length for the CHARACTER type from 10 to 21 and then loads data.
T1(C1 CHAR(10), C2 BLOB)
T2(C1 CHAR(21), C2 BLOB)
C1,type=char(10)
C2
If data conversion results in BLOB data placed between the BINARY type data, BINARY parameter data of abstract data type, and BLOB parameter data of an abstract data type, you need to allocate memory to retain that BLOB data. If the utility is unable to allocate this memory, it terminates with a memory allocation error. Memory allocation is required in the following cases:
The figure below shows the data arrangement in an input data file in pdrorg-output binary format that is output from a table for which BINARY type columns, abstract data type columns with BLOB attribute, and BLOB type columns are defined.
Figure 5-27 Data arrangement in an input data file in the pdrorg-created binary format