Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     CASE loops in webfocus
Go
New
Search
Notify
Tools
Reply
  
CASE loops in webfocus
 Login/Join
 
<pushpa_koneri>
posted
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 ... :-)
 
Reply With QuoteReport This Post
<WFUser>
posted
Try -REPEAT
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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:

-GOTO &PARMNAME

where you have branch labels set up in your code.

-RED
(do code for &PARMNAME=RED)
-GOTO DONE
-*
-GREEN
(do code for &PARMNAME=GREEN)
-GOTO DONE
-*
-BLUE
(do code for &PARMNAME=BLUE)
-GOTO DONE

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.
 
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
CASE logic is used in MODIFY:
here's the url
http://documentation.informationbuilders.com/masterinde...ifydatasources11.htm
or..
just go to Knowledge Base Search and put in
CASE logic
and take the first response you get back.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     CASE loops in webfocus

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.