Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

More BMC Unload/Load issue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: More BMC Unload/Load issue
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    Post subject: More BMC Unload/Load issue
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us