Soft Delete

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
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Soft Delete

Post by shrey3a »

Hi,

I need to set the soft delete flag in the dB. Data is coming as below

The data is coming as

Key Image
123 1234
123 1234

124 145
124 0

154 0
154 0

In above scenario 1 has no change , 2nd is delete as it has before image and after image is set to '0'

The third has no after and before image i.e. by default come as '0'

o/p should be

Key Image Flag
123 1234 N
123 1234 N

124 145 Y
124 0 N

154 0 N
154 0 N

I tried with stage variables but it falls out.

Thanks in help for advance.

Regards,
-M
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why aren't you using one of the change detection stages (Change Capture, Difference or Compare stage)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Post by shrey3a »

Hi Ray,

I thought of it but change capture stage o/p only one row and I will loose my before image these are the messages from MQ series with before and after images coming in unit of work.

Regards

ray.wurlod wrote:Why aren't you using one of the change detection stages (Change Capture, Difference or Compare stage)?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So use Compare stage, which outputs both inputs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Post by shrey3a »

Hi Ray,

I tried using it but compare stage only o/p one link.

Regards,
ray.wurlod wrote:So use Compare stage, which outputs both inputs.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's only one output but it contains three fields: the first input row (as a subrecord), the second input (as a subrecord) and the difference result.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply