IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

More BMC Unload/Load issue


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vishwamurthy

New User


Joined: 11 Mar 2008
Posts: 57
Location: India

PostPosted: Mon May 17, 2010 12:19 pm
Reply with quote

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
View user's profile Send private message
Vishwamurthy

New User


Joined: 11 Mar 2008
Posts: 57
Location: India

PostPosted: Tue May 18, 2010 12:36 pm
Reply with quote

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
View user's profile Send private message
alluri12

New User


Joined: 15 Aug 2006
Posts: 44
Location: Virginia, USA

PostPosted: Wed May 19, 2010 12:59 am
Reply with quote

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
View user's profile Send private message
Vishwamurthy

New User


Joined: 11 Mar 2008
Posts: 57
Location: India

PostPosted: Thu May 20, 2010 9:35 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top