Sequence no's
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
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.
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
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.