Posted: Tue Jul 18, 2006 8:24 am Post subject: Keeping blanks with db2 load utility
Hi,
I'm trying to write a JCL to load some data into db2 v7 for z/OS.
I have a column defined as
Code:
SCHEMA_DESC VARCHAR (128) DEFAULT ' ' NOT NULL
In my load data all the rows of this column have spaces in them, however when I run the JCL I get error code 26 from the load utility- that the column is null. I think the load utility is trimming the blank spaces? Does anyone know how to stop this?
Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Tue Jul 18, 2006 8:41 am Post subject:
Elroy,
When you unloaded the data , the utility DSNTIAUL will also write out a load card in the SYSPUNCH dd. So use that output as load card instead of your own load card.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Fri Jul 21, 2006 1:42 pm Post subject:
Quote:
In my load data all the rows of this column have spaces in them
Unfortunately, that does not seem to be the case.
Try doing a FIND ALL if the file is not big. Or, use DFSORT to omit records having spaces and see how many records you get. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum