View previous topic :: View next topic
|
Author |
Message |
alluri12
New User
Joined: 15 Aug 2006 Posts: 44 Location: Virginia, USA
|
|
|
|
Hi,
I am having problem in unload and load process
Before unload
I had a table abcd with
col1 char(4) not null with default
col2 char(3) not null with default
col3 char(3) not null with default
col4 varchar(49) not null with default
TABLE EFGH
col1 char(4) not null with default
col2 char(3) not null with default
col3 char(3) not null with default
col4 char(9) not null with default
col5 char(10) not null with default
col6 char(10) not null with default
All these days I tried to unload data from ABCD table and used to
load replace data into EFGH table. It worked fine.
But now due to new requirements we got to ALTER the table to add 4
new columns to both the tables ABCD and EFGH.
Now the new table looks like
I had a table abcd with
col1 char(4) not null with default
col2 char(3) not null with default
col3 char(3) not null with default
col4 varchar(49) not null with default
col5 char(3) nulls with default
col6 char(3) nulls with default
col7 char(3) nulls with default
col8 varchar(50) nulls with default
TABLE EFGH
col1 char(4) not null with default
col2 char(3) not null with default
col3 char(3) not null with default
col4 char(9) not null with default
col5 char(10) not null with default
col6 char(10) not null with default
col7 char(3) nulls with default
col8 char(3) nulls with default
col9 char(3) nulls with default
col10 varchar(50) nulls with default
I tried to unload data from abcd.what is happening is if the col4 varchar(49)
has data until 30 bytes and remaining is spaces, then data from col5, col6,
col7 and col8 coming into this spaces. Because of that i am not able to load the data
into other table. The error i am getting is
BMC51502E FIELD 'COL7' EXTENDS BEYOND END-OF-RECORD, START POSITION = 66
END POSITION = 69, RECORD NO. 1 OF SYSREC01, LENGTH = 68
Table abcd has data
Code: |
col1 col2 col3 col4 col5 col6 col7 col8
1111 033 109 035200902033106010MIMIGUELO01 ...? ...? ...? ..?
1111 033 109 035200902033106010MIMIGUELO01AAABBB11122233344455...? ...? ...? ..?
|
This is the unloaded data
Code: |
1111033109035200902033106010MIMIGUELO01...?...?...?..?
1111033109035200902033106010MIMIGUELO01AAABBB11122233344455...?...?...?..? |
The unloaded data i am expecting is
This is the unloaded data
Code: |
1111033109035200902033106010MIMIGUELO01 ...?...?...?..?
1111033109035200902033106010MIMIGUELO01AAABBB11122233344455...?...?...?..? |
Could anybody please help me in getting the expected output to load into the other table
|
|
Back to top |
|
|
Santoshdorge
New User
Joined: 27 Jun 2006 Posts: 48 Location: Pune
|
|
|
|
Hi Alluri,
My Primary guess is atfer altering the table abcd you don't have the proper values in the newly added columns due to 'with default' caluse.
You may need to initialize all newly added column according to the data type. And then try unload the same and loading into EFGH table.
Thanks,
Santosh. |
|
Back to top |
|
|
alluri12
New User
Joined: 15 Aug 2006 Posts: 44 Location: Virginia, USA
|
|
|
|
Hi Santhosh
This has nothing to do with the initializing. We are expecting nulls new the new columns. The actual problem is at varchar, just before the new column starts i.e at col4. If the data in the VARCHAR is less than 49 and it has spaces after that then the new column data i.e col5 data is coming into that. This messes up when u try to load data into other table. |
|
Back to top |
|
|
|