Page 1 of 1
Sequence no's
Posted: Tue Mar 01, 2005 12:44 pm
by naren6876
Hi,
Posted: Tue Mar 01, 2005 12:57 pm
by Sainath.Srinivasan
Assuming your input record is called MyRecord, you can define a stage variable MySeqNo and set default to 0.
In the derivation for this stage variable, enter
If MyRecord[26, 1] = 'P' Then MySeqNo + 1 Else MySeqNo
In the output column derivation, add a 3 field char in the front and in its derivation enter
Fmt(MySeqNo, "3'0'R")
Alternatively if the output is single column / field, enter
Fmt(MySeqNo, "3'0'R") : MyLink.MyRecord
I believe I had replied similar post before and hence it may be better to search the forum before posting new ones to save your time.
Re: Sequence no's
Posted: Tue Mar 01, 2005 1:04 pm
by srikie
use keymgmtget next value function to generate the sequence number and character matching can b done using the substring function. hold sequence number in a stage variable so that it cud b copied until the next string with p occurs.