Store the previous record in the Stage Variables.
If the condition is satisifed for changing the previous record then process the previous record with the changes and send it in on a different link (which will be an update link) (the insert link will be used for current record).
Although it is an outline, Hope you will find it useful.
Update previous record based on current
Moderators: chulett, rschirm, roy
Thanks for the inputs. I was successfull in comparing the previous and current values and also successfull in checking the date ranges.gateleys wrote:Try using the RowProcCompareWithPreviousValue() function available with DataStage. It allows you to compare your current value with the previous value.
gateleys
What I want here is updating the previous record based on the current.
thanks
Thanks,
RCil
RCil
If you change your sort order then you would be changing your current record based on the previous one - meaning you wouldn't need to do an update of a changed record.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Charter Member
- Posts: 143
- Joined: Thu Nov 04, 2004 6:53 am
rcil wrote:Thanks for the inputs. I was successfull in comparing the previous and current values and also successfull in checking the date ranges.gateleys wrote:Try using the RowProcCompareWithPreviousValue() function available with DataStage. It allows you to compare your current value with the previous value.
gateleys
What I want here is updating the previous record based on the current.
thanks
Why donot you order your data based on MNO, PTYPE asc, PNO DESC
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The previous record has already been processed when you are processing the current record, and therefore can not be edited other than in a second pass through the data or some form of intermediate storage that can be updated (for example a UV 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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.