Hi,
I have a situation where I need to keep track of some past occurrence of a field value. Example: If InLink.Column = 'remember me' then I set a stage variable svIsRemember = 1. Now, as I process through other records, I check for occurrence of anohter string InLink.Column = 'String to change', that is EREPLACED with 'new String' if svIsRemember = 1. Note: svIsRemember is reset (=0) if I encounter a column with string 'Stop Remember'.
I could do it if I could write an IF statement without the ELSE clause. Can anyone suggest how I could do this?
Thanks,
gateleys
Remembering past occurrence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 94
- Joined: Wed May 08, 2002 8:44 am
- Location: Germany
- Contact:
Re: Remembering past occurrence
Hi,
I'm not sure if I got your point, but on a stagevar derivation you can specify something like
If in.field1='xxx' then 1 else stagevar
to keep the contents of stagevar "untouched" in the else case.
Best regards
Klaus
I'm not sure if I got your point, but on a stagevar derivation you can specify something like
If in.field1='xxx' then 1 else stagevar
to keep the contents of stagevar "untouched" in the else case.
Best regards
Klaus
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In an expression you can not use statements. The conditional expression (IF test THEN value ELSE value) is an expression; it must always return a value and must, therefore, always have both a THEN part and an ELSE part.
The IF statement is only available in Routines.
The IF statement is only available in Routines.
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.