Page 1 of 1

Posted: Fri Mar 24, 2006 1:31 am
by loveojha2
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.

Posted: Fri Mar 24, 2006 7:35 am
by gateleys
Try using the RowProcCompareWithPreviousValue() function available with DataStage. It allows you to compare your current value with the previous value.

gateleys

Posted: Fri Mar 24, 2006 9:37 am
by rcil
gateleys wrote:Try using the RowProcCompareWithPreviousValue() function available with DataStage. It allows you to compare your current value with the previous value.

gateleys
Thanks for the inputs. I was successfull in comparing the previous and current values and also successfull in checking the date ranges.

What I want here is updating the previous record based on the current.

thanks

Posted: Fri Mar 24, 2006 9:58 am
by ArndW
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.

Posted: Fri Mar 24, 2006 9:58 am
by vcannadevula
rcil wrote:
gateleys wrote:Try using the RowProcCompareWithPreviousValue() function available with DataStage. It allows you to compare your current value with the previous value.

gateleys
Thanks for the inputs. I was successfull in comparing the previous and current values and also successfull in checking the date ranges.

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

Posted: Fri Mar 24, 2006 4:29 pm
by ray.wurlod
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).