Comparison logic not working

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
esivaprasad
Participant
Posts: 135
Joined: Tue Dec 09, 2008 10:35 am

Comparison logic not working

Post by esivaprasad »

Hi Team ,


In our project , we are doing reconcillation on 2 sources.
in both source , one source file is in .txt format and other source is in form of .csv .

In reconcillation job before comparing 2 sources , in transformer stage , we are trimming all fields in both source files.
for reconcillation , we are using CDC stage.
after cdc stage , we have target stage .
few records are coming as not matching records, if we see those records, that are same in both sources.


we have seen those records in notepad, textpad and in excel , but records are same , still it coming as not matching one to other source record values.
Please let me know other trim and tril leading trailing functions , what functions we can use for triming.

Source|SourceSystem|Customer_Number|Account_Group|Name1|Fax_Country|Fax_Number|Sequence_Number|Standard_Fax_No
Source1|LA|0000013010|Z012|INDUSTRIA DE LICORES DEL VALLE|CO|2 68303||
Source2|LA|0000013010|Z012|INDUSTRIA DE LICORES DEL VALLE|CO|2 68303||
Siva
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Perhaps one record contains non-printable control characters or the ASCII NULL character 0x00 which is often introduced by DataStage due to the default setting of the project environment variable APT_STRING_PADCHAR. We always override the default setting at the project level by using 0x20 instead, which is a space. If you view your text file records in hex, maybe something will jump out.
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Was just going to suggest much the same thing - get thee to a hex editor! Or an octal dump "od" can be leveraged on the server.
Last edited by chulett on Thu Nov 30, 2017 1:19 pm, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

If by CDC you mean the Change Capture stage, then be aware that it requires unique keys on both input links. You can see the result you describe when there are duplicate keys.

Mike
Post Reply