Focal Point
CASE loops in webfocus

This topic can be found at:

April 05, 2004, 05:30 PM
CASE loops in webfocus
Hey Guys
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 ... :-)
April 05, 2004, 07:13 PM
April 05, 2004, 07:18 PM
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.
April 05, 2004, 11:32 PM
CASE logic is used in MODIFY:
here's the url
just go to Knowledge Base Search and put in
CASE logic
and take the first response you get back.