Comparing two files

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
vikibemech
Participant
Posts: 46
Joined: Fri May 02, 2008 1:11 am
Location: Chennai

Comparing two files

Post by vikibemech »

I have two files (Seq1 & seq2) and need to compare two file with column name policy.

Seq File1
Policy_no
Type

Seq File2
Policy_no

I am comparing both policy_no and if matched then type should be XX Else YY. I am doing this logic (col1=col2 then xx else yy) in transformer and defining the logic in column Type but I am not getting correct results.

Any advice will be very much helpful.
Vignesh Kumar N
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First question - is this actually a Server job as you've marked it?

Secondly, what is your job design? How are you bringing two files in and comparing them "in transformer"?
-craig

"You can never have too many knives" -- Logan Nine Fingers
vikibemech
Participant
Posts: 46
Joined: Fri May 02, 2008 1:11 am
Location: Chennai

Comparing two files

Post by vikibemech »

Yes it is server job.
Small change in design. It is not seq file instead it is hashed file.

hash 1 & 2 -> Transformer->hash file
Vignesh Kumar N
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, so off we go to the Server forum.

Since a transformer can't have two stream inputs, how are you bringing them in? HF1 is the stream input and HF2 is a reference input? Can we assume that 'policy number' is the key field in both hashed files and your reference lookup is based on that key? Please let us know if I've gotten anything wrong.

ps. Saying that you are "not getting correct results" doesn't really help us help you. What results are you getting? What's not working about whatever it is you are doing?
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Copy and paste the exact logic from your job. Is there any chance you need to trim each column before comparing? One may have more leading or trailing spaces than the other.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply