Do we have CASE LOOP or anything similar to
case loop in webfocus. I need to
differentiate between 30 different variables
and according perform seperate operations.
IF-THEN-GOTO doesn't appeal to me in htis
situation so was wondering if I can get
something similar to CASE LOOP.
Thanks in advance for your help ... :-)
You could use a branch table based on the incoming value, or on a DECODEd value.
For example, the direct method, where the value of &PARMNAME could be RED or GREEN or BLUE, you can say:
where you have branch labels set up in your code.
(do code for &PARMNAME=RED)
(do code for &PARMNAME=GREEN)
(do code for &PARMNAME=BLUE)
You would also want to test to make sure that the value of &PARMNAME is one of the valid values. This could be done via a list in a HOLD file (or flat file) or using a DECODE list.
CASE logic is used in MODIFY:
here's the url
just go to Knowledge Base Search and put in
and take the first response you get back.
|Powered by Social Strata|