problem when inserting records into DB2 table

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

problem when inserting records into DB2 table

Post by vij »

Hi all,

I facing a problem when data got loaded into a DB2 table.
The job has Dataset as a source and it laods into a DB2 table. There is a column of Char datatype with 8 as length , which gets populated inthe table as 8 boxes.( i could not paste it over here).

When i viewed the data, it is neither null nor space, it was just empty. From the source, which is again a DB2 table, the value is space.

Please help me solving this issue.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Send it to a text file and use a hex editor to find out what the box character represents. My guess would be the character specified by APT_STRING_PADCHAR environment variable, used to pad Char fields to their correct length. In a hex editor this will probably be displayed as 00 or, in the viewable area, as ^@.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

The APT_STRING_PAD character is is used in the job, with no value passed to it and still the problem persists for records which have space in the input.

can any one help me solve the problem?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please do what I suggested (output to text file). You have provided no extra diagnostic information in your latest post.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

Hi ray,

Thanks for your reply. I agree that I did not give more information on it, as I could not read your complete reply.

Ok, now I have sent that to a txt file and opened in a HEX editor.The Hex values are 00 for every every box., thats is for every character in the table, it is 00.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... which is the default value for APT_STRING_PADCHAR. Set this up as a job parameter and change its value to " " (a space character).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

I tried using that vaiable and passing " " space as the value, but it didnot work. still i am facing that problem.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Hex code for space is 20. Try using 0x20 instead of ' '
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

I tried 0x20 also, there is no change, it is the same.
Post Reply