Accomodating Long message into column



IBM's flagship relational database management system

Accomodating Long message into column

Postby coldplay1991 » Fri Dec 09, 2011 1:54 am

Hi, I am loading a message from a source file and while load it (using DB2 LOAD) to a new table, the new column can not fully show it even though the character limit is very high. Also, is there any ideal SQL data choice and modifier to LOAD the long message output properly into the new table column(my target location). I dont want it to overflow to 2 lines and not show half or broken either.
coldplay1991
 
Posts: 59
Joined: Tue Nov 15, 2011 5:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: Accomodating Long message into column

Postby dick scherrer » Fri Dec 09, 2011 3:34 am

Hello,

I am loading a message from a source file and while load it (using DB2 LOAD) to a new table, the new column can not fully show it even though the character limit is very high.
Why not :?
If the column is defined as "n" nytes, "n" bytes should work just fine.

You may need to consider reformatting the input data to conform to the rules (which have not been posted).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Accomodating Long message into column

Postby coldplay1991 » Fri Dec 09, 2011 12:56 pm

I cant change input data dude. What N bytes you mean CHAR(n) ?
The input data is being truncated when I am copying it to a table.What is the idea way to show it full and in 1 row.
coldplay1991
 
Posts: 59
Joined: Tue Nov 15, 2011 5:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: Accomodating Long message into column

Postby coldplay1991 » Fri Dec 09, 2011 12:58 pm

DSNE612I DATA FOR COLUMN HEADER MESSAGE COLUMN NUMBER 6 WAS TRUNCATED
coldplay1991
 
Posts: 59
Joined: Tue Nov 15, 2011 5:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: Accomodating Long message into column

Postby dick scherrer » Fri Dec 09, 2011 1:20 pm

Hello,

I see you are having difficulty with this concept. . . If you have 100 bytes of data (the actual number does not matter) and try to put this into a 30-byte column - it will not go in there.

What is the idea way to show it full and in 1 row.
If it will not fit, there is no "idea way". You can truncate the data before the load or you can just let it be lost. If you actively look at the data and report length problems, it may help resolve the problem.

Unless i've missed something i see 3 alternatives:
Change the table definition to prevent truncation.
Change the data to fit.
Just do nothing and live with it.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Accomodating Long message into column

Postby coldplay1991 » Fri Dec 09, 2011 1:23 pm

What do you want me to post?
coldplay1991
 
Posts: 59
Joined: Tue Nov 15, 2011 5:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: Accomodating Long message into column

Postby coldplay1991 » Fri Dec 09, 2011 1:25 pm

see this image
You do not have the required permissions to view the files attached to this post.
coldplay1991
 
Posts: 59
Joined: Tue Nov 15, 2011 5:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: Accomodating Long message into column

Postby coldplay1991 » Fri Dec 09, 2011 1:27 pm

this is my current load method
You do not have the required permissions to view the files attached to this post.
coldplay1991
 
Posts: 59
Joined: Tue Nov 15, 2011 5:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: Accomodating Long message into column

Postby db2sysdba » Fri Dec 09, 2011 1:58 pm

Provide the DDL of your target table(SHE0015.SDSFLG)
db2sysdba
 
Posts: 18
Joined: Wed Sep 28, 2011 4:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Accomodating Long message into column

Postby coldplay1991 » Fri Dec 09, 2011 2:04 pm

I did its in the picture posted above you. the SQL for the SHE0015.SDSFLG
coldplay1991
 
Posts: 59
Joined: Tue Nov 15, 2011 5:47 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post