Generic CDC job that can be used across any file

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

Post Reply
Bhargav86
Participant
Posts: 2
Joined: Thu Apr 10, 2014 4:47 am

Generic CDC job that can be used across any file

Post by Bhargav86 »

Hi,

Could you please help me anyone how to impliment generic CDC logic for any number of fields and any number of keys.

Thanks,
Bhargav
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

That will be a bit tough to explain, I have done it in past though. Why don't you explain what you are trying to achieve and what all information about file metadata you will have to design such a job.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

In a nutshell, you will need following information to get started.

whether the file is delimited or fixed width. if delimited which all fields are to be considered as keys and which all to be used for comparison. if fixed width start and end position of key and data fields.

You will need a little bit of looping here to concatenate all key fields together in one variable and data field in another one as they are not fixed. So you have to be on DataStage 8.5 or higher. if you need you can join back the result to get actual records and mark them with change codes.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

if on earlier version you need to have enough stage variables to capture the max number of key and data fields. In fixed length you can optimize it by multiple continuous fields defined as one.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply