Change Data Capture stage

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

SettValleyConsulting
Premium Member
Premium Member
Posts: 72
Joined: Thu Sep 04, 2003 5:01 am
Location: UK & Europe

Post by SettValleyConsulting »

In that case the setting of APT_STRING_PADCHAR may well be the problem.

This specifies the character that Datastage will use to pad out strings when you move a string to a longer CHAR field - for example a 4-character string to a CHAR(6) - it will add two of this character to the end of the field. The factory default for this variable is ASCII 0 (null) (odd choice, but there you are) which may explain why you have trailing nulls in your data.

Nulls usually appear as spaces in the View Data option, I've expended a lot of time and bad language trying to figure out why two apparently identical key fields did not match in a Join stage before checking this 'feature'. A useful quick and dirty diagnostic technique is to dump the suspect fields out to a sequential file but with added delimiters eg '[': field : ']'. If you have trailing nulls the last ']' will not appear.

If you do not explicitly specify a value for APT_STRING_PADCHAR in your job it will inherit the project-level default, so the solution may be to set the variable to a value to match your other data stream either at job or project level, though if the latter, note that the value will be used by all existing jobs in the project, which may mean some regression testing.

Phil Clarke.

PS I generally set APT_STRING_PADCHAR to <single space> as part of the checklist for a new project, and a good tip is to use the value 0x20 rather than typing in a space as it is not easy to distinguish a space from <empty>
sanjumsm
Premium Member
Premium Member
Posts: 64
Joined: Tue Oct 17, 2006 11:29 pm
Location: Toronto

Re: Change Data Capture stage

Post by sanjumsm »

Raj,
Have you checked with exclude value. It can exclude the column name from CDC. I faced the same problem. I removed column one by one and done the testing. In my case there was problem with duplicate values in the column. It may also be there because of null value in the column on which you are applying the change capture.

Sanjeev
sanjeev kumar
rajkraj
Premium Member
Premium Member
Posts: 98
Joined: Wed Jun 15, 2005 1:41 pm

Post by rajkraj »

The environment variable APT_STRING_PADCHAR has been set to default .
what should i change it o overcome this problem.

Thanks
Post Reply