Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] case type logic

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] case type logic
 Login/Join
 
Member
posted
Hi, I am not a web-focus user, but am at the mercy of one on a current project that I am on.
I am passing multiple fields that she uses for creating a report. I would like her to interrogate one field, and based on the value of that field, handle another field a certain way. I am a cobol mainframer, so something like - If field A = 'NA' move field A to field C, else move field B to field C. Sure would seem like a simple thing to do, but as I stated, I am not a web-focus developer. A little help for my web-focus newbie please. thanks

This message has been edited. Last edited by: Tamra,


WebFOCUS 8
Windows, All Outputs
 
Posts: 1 | Registered: May 26, 2017Report This Post
Virtuoso
posted Hide Post
Need to use a DEFINEd variable.

Something such as
DEFINE FILE CAR
AREA  /A10 = IF COUNTRY EQ 'ENGLAND' OR 'FRANCE' THEN 'EAST' ELSE IF COUNTRY EQ 'ITALY' THEN 'MIDDLE' ELSE 'WEST';
AREA2 /A10 = DECODE COUNTRY ('ENGLAND' 'EAST' 'FRANCE' 'EAST' 'ITALY' 'MIDDLE' ELSE 'WEST');
COST  /D10 = IF COUNTRY EQ 'ENGLAND' OR 'FRANCE' THEN RETAIL_COST ELSE DEALER_COST;
END

TABLE FILE CAR
PRINT AREA
      AREA2
      RETAIL_COST
      DEALER_COST
      COST
BY COUNTRY
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
Jimilives: Or, COMPUTE
TABLE FILE CAR
SUM 
COMPUTE AREA /A10 = IF COUNTRY EQ 'ENGLAND' OR 'FRANCE' THEN 'EAST' ELSE IF COUNTRY EQ 'ITALY' THEN 'MIDDLE' ELSE 'WEST';
COMPUTE AREA2/A10 = DECODE COUNTRY    ('ENGLAND' 'EAST' 'FRANCE' 'EAST' 'ITALY' 'MIDDLE' ELSE 'WEST');
      RETAIL_COST
      DEALER_COST
COMPUTE COST/D10 = IF COUNTRY EQ 'ENGLAND' OR 'FRANCE' THEN RETAIL_COST ELSE DEALER_COST;
BY COUNTRY
END

Check out the difference between DEFINE and COMPUTE.

Hendix?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Hi Jimilives

Welcome to Focal Point as you can already see people are very quick to reply and give you the guidance you need.

Since you are so new to WebFOCUS I would highly recommend using IBI education services to help get up to speed.

Don't be shy to reach out!


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] case type logic

Copyright © 1996-2020 Information Builders