Hi all,
i have a file/table that holds 2columns OldPolicy,NewPolicy
eg:
OldPolid , NewPolid
AA , AB
AB , AC
AC , AD
BA , BB
BB , BC
AA became AB,AB became AC, AC became AD.The net result is that AA became AD and similarly BA became BC . I need to reflect this as:
OldPolid , NewPolid
AA , AD
BA , BC
Is it best to do this using stage variables.I would be grateful for any suggestions.
looping
Moderators: chulett, rschirm, roy
Re: looping
Did u give it a try with stage variables and RowProcGetPreviousValue() ?
I think that should work. In the constraints you should have a condition
RowProcGetPreviousValue(NewPolid) <> OldPolid
to write into output.
IHTH
I think that should work. In the constraints you should have a condition
RowProcGetPreviousValue(NewPolid) <> OldPolid
to write into output.
IHTH
Re: looping
raju_chvr wrote:Did u give it a try with stage variables and RowProcGetPreviousValue() ?
I think that should work. In the constraints you should have a condition
RowProcGetPreviousValue(NewPolid) <> OldPolid
to write into output.
IHTH
This didnt work, any ideas why or other methods, thanks in advance
Re: looping
If the input data is not too big the easiest would be to write a small BASIC DataStage job to cover your required functionality.
Ogmios
Ogmios
Re: looping
Can you post the cariables and their derivation you are using ? for this ..
I will talk a look into it.
I will talk a look into it.
Use stage variables. It is easier to understand. Do a search. This has been covered in viewtopic.php?t=84848
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Can you do something like the following:
Code: Select all
SELECT SUBSTR(OldID,1,1) AS FirstChar, MIN(OldID), MAX(NewID)
FROM tablename
GROUP BY FirstChar;
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.