Page 1 of 1

problem when inserting records into DB2 table

Posted: Mon Jun 18, 2007 10:45 pm
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.

Posted: Mon Jun 18, 2007 10:53 pm
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 ^@.

Posted: Tue Jun 19, 2007 5:48 am
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?

Posted: Tue Jun 19, 2007 5:51 am
by ray.wurlod
Please do what I suggested (output to text file). You have provided no extra diagnostic information in your latest post.

Posted: Tue Jun 19, 2007 6:55 am
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.

Posted: Tue Jun 19, 2007 3:05 pm
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).

Posted: Wed Jun 20, 2007 2:05 am
by vij
I tried using that vaiable and passing " " space as the value, but it didnot work. still i am facing that problem.

Posted: Wed Jun 20, 2007 2:13 am
by JoshGeorge
Hex code for space is 20. Try using 0x20 instead of ' '

Posted: Wed Jun 20, 2007 2:45 am
by vij
I tried 0x20 also, there is no change, it is the same.