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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QMF VARCHAR EXPORT IMPORT SQLCODE -408

Status
Not open for further replies.
M

Member 310024

Guest
The problem is, I am getting an SQLCODE -408,
"new value has wrong data type from column STD_VOL_LENGTH".

I am trying to export a subset of records from a DB2 table (containing VARCHAR fields) in one data-base to the corresponding table in a copy/test database.
I am using QMF.
In DB#1, I use QMF to export data to ...
In DB#2, I use QMF to import data from ...
then, save data as tempxyz
then
INSERT INTO DB#2.tblename
SELECT * FROM tempXYZ

But this fails & it looks like it's because there's a problem with the 2-byte length component of the varchar field.

Has anyone encountered this problem before?
Thanks in advance for any help.
 
It seems like the export loses the VARCHAR attribute.

Can you issue the CONNECT TO DB2#2 command from DB2#1 after selecting the data you require? That would do away with the EXPORT, but I still think you might have a problem.
 
Terminate,
Having had a bit more time to think about this, are your two db2 locations known to each other via the sysibm.syslocations table? If so, it might be that you can access the data you require from the db2#1 region straight into the db2#2 region with a comand along the lines of:

SELECT * FROM DB2#1.TERMINATE.TABLENAME

Then save that data under QMF in the region you're in and insert from there. Hopefully, that way that formatting is not lost.

Hope this helps.

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top