View previous topic :: View next topic
|
Author |
Message |
Vishwamurthy
New User
Joined: 11 Mar 2008 Posts: 57 Location: India
|
|
|
|
Hi! I have the same issue as BMC Unload/Load issue in loading from a table ABCD into a table EFGH..
The table EFGH is a new table used to archive ABCD..
Could anyone help me with this?
Guess by this time alluri might've gotten the issue resolved.. any pointers will be appreciated |
|
Back to top |
|
|
Vishwamurthy
New User
Joined: 11 Mar 2008 Posts: 57 Location: India
|
|
|
|
Hi,
This error is happening due to presence of NULL columns in the new table. The data from the input table is in columns with NOT NULL specified. The varchar character in error is the at the very end of the record |
|
Back to top |
|
|
alluri12
New User
Joined: 15 Aug 2006 Posts: 44 Location: Virginia, USA
|
|
|
|
Hi Vishwamurthy
After further analysis the issue which i had got resolved by removing bad data from the original table. Once they removed the bad data i never had that issue
For yoru case, Try one of these
First Verify if the data is valid or not.
2nd
Run the BMC Unload utility and then take the control card. If it has the Varchar column then the control card will have * for that position. Try to load using that control card.
Here is the example
I had a table abcd with
col1 char(4) not null with default
col2 char(3) not null with default
col3 varchar(49) not null with default
col4 char(3) nulls with default
col5 char(3) nulls with default
col6 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(19) not null with default
col4 char(10) not null with default
col5 char(20) not null with default
col6 char(3) nulls with default
col7 char(3) nulls with default
col8 char(3) nulls with default
col9 varchar(50) nulls with default
Load control card
Code: |
col1 POSITION(1:4) CHAR (4)
,col2 POSITION(5:7) CHAR (3)
,col3 POSITION(8:26) CHAR (19)
,col4 POSITION(27:36) CHAR (10)
,col5 POSITION(37:56) CHAR (20)
,col6 POSITION(57:59) CHAR (3)
NULLIF BMC_NULL1=X'6F'
, BMC_NULL1 POSITION(60) CHAR(1)
,col7 POSITION(61:63) CHAR (3)
NULLIF BMC_NULL2=X'6F'
, BMC_NULL2 POSITION(64) CHAR(1)
,col8 POSITION(65:67) CHAR (3)
NULLIF BMC_NULL3=X'6F'
, BMC_NULL3 POSITION(68) CHAR(1)
,col9 POSITION(69:*) VARCHAR
NULLIF BMC_NULL4=X'6F'
, BMC_NULL4 POSITION(*) CHAR(1) |
If it does not work.. send me ur exact situation... best example |
|
Back to top |
|
|
Vishwamurthy
New User
Joined: 11 Mar 2008 Posts: 57 Location: India
|
|
|
|
This has been resolved.
What we did..
We used a CAST(COALESCE(FIELD,' ') AS DATATYPE) for all the nullable columns, added a character to catch null after the column specification, and used another CAST(COALESCE(FIELD,'1900-01-01-00.00.00.000000') AS CHAR(26)) for the TIMESTAMP column
Then took the unload from both the input tables. And then tried loading the same into the new table and then BINGO!! |
|
Back to top |
|
|
|