I have written my first Parallel jobs and when I look at the data loaded to the DB2 table, the CHAR fields are padded with 'low values' (x'00') not spaces. I create a dataset in the first job and merge it with a seq file in the second and send the rejects (no match for the seq file) to a data set and just three columns to a small DB2 table.
I use the Transformer to send all columns to the the data set output link and split 2 columns and create a third column with a literal to the other output link which goes to the DB2 UDB API stage.
What am I doing to cause x'00' to pad the DB2 table? The dataset doesn't LOOK like it has any x'00's at the end.
Loading to DB2 with PX
Moderators: chulett, rschirm, roy
Loading to DB2 with PX
Michael Favero
2852 Humboldt Ave So
Minneapolis, MN 55408
2852 Humboldt Ave So
Minneapolis, MN 55408
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You are leaving APT_STRING _PADCHAR environment variable set to its default value (0x00). If you want space padding, bring this into your job as a job parameter and change its value to a single space character or, if you must, 0x20.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I find this all very strange when used to server of course, but I did determine that the Merge Stage caused the padding with x'00' on the key fields.
I managed to work around the problem by putting a transform stage with a Convert(from_Merge.column_name, char(00), ' '). This turned all the nulls to spaces.
I will try the APT_STRING _PADCHAR when I have time. You sure this isn't some kind of Thai dish or maybe far eastern musical instrument?
I managed to work around the problem by putting a transform stage with a Convert(from_Merge.column_name, char(00), ' '). This turned all the nulls to spaces.
I will try the APT_STRING _PADCHAR when I have time. You sure this isn't some kind of Thai dish or maybe far eastern musical instrument?
Michael Favero
2852 Humboldt Ave So
Minneapolis, MN 55408
2852 Humboldt Ave So
Minneapolis, MN 55408
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: