Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

db2 load w/ method option

Status
Not open for further replies.

pmcmicha

Technical User
May 25, 2000
353
0
0
Recently the company I work for moved to supporting double byte characters in the UDB8.2 database. As the DB was already setup as (utf-8, codepage=1208) this was not much of an issue, but when we loaded our first test case, it failed.

Code:
db2 "load from <DAT_FILE> of del modified by chardel~ coldel codepage=1208 insert <TABLE_NAME> nonrecoverable"

Upon further research, we came across the method option. After reloading the table with this option, the double byte characters can be viewed.

Code:
db2 "load from <DAT_FILE> of del modified by chardel~ coldel| codepage=1208 method P (1, 2, 3, ...) nonrecoverable"

I am trying to locate information about this load option that goes into some detail, but so far I have come up with nothing. Could someone either point me in the right direction or provide a detailed explanation of why this option makes a difference? Thanks in advance.
 
Just in case you haven't seen: I'll repeat what it says there about the method option.

METHOD
L
Specifies the start and end column numbers from which to load data. A column number is a byte offset from the beginning of a row of data. It is numbered starting from 1.
Note:
This method can only be used with ASC files, and is the only valid method for that file type.
N
Specifies the names of the columns in the data file to be loaded. The case of these column names must match the case of the corresponding names in the system catalogs. Each table column that is not nullable should have a corresponding entry in the METHOD N list. For example, given data fields F1, F2, F3, F4, F5, and F6, and table columns C1 INT, C2 INT NOT NULL, C3 INT NOT NULL, and C4 INT, method N (F2, F1, F4, F3) is a valid request, while method N (F2, F1) is not valid.
Note:
This method can only be used with file types IXF or CURSOR.
P
Specifies the field numbers (numbered from 1) of the input data fields to be loaded. Each table column that is not nullable should have a corresponding entry in the METHOD P list. For example, given data fields F1, F2, F3, F4, F5, and F6, and table columns C1 INT, C2 INT NOT NULL, C3 INT NOT NULL, and C4 INT, method P (2, 1, 4, 3) is a valid request, while method P (2, 1) is not valid.
Note:
This method can only be used with file types IXF, DEL, or CURSOR, and is the only valid method for the DEL file type

I suspect you've already seen this, but thought it might be interesting in case you haven't.

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top