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] Join and conditional define

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Join and conditional define
 Login/Join
 
Member
posted
Hello,

I am trying to build a request based on 3 files.
First file has productid, distributor and manufacturer
Second file has distributor, distributor_code and distributor_status
Third file has manufacturer, manufacturer_code and manufacturer_status

In the output I would like to list the PRODUCTID from PRODUCT, the distributor_code from DISTCO and manufacturer_code from MANUFCO in a single field COMPANY_CODE and company_status from DISTCO and manufacturer_status from MANUFCO in a single field STATUS

Also in the case where distributor code and manufacturer code are equal STATUS would be 'DIST/MANUF' and output will be only one row.

Here is an example:
INPUT
PRODUCT
PRODUCTID MANUFACTURER DISTRIBUTOR
PRODUCT1 COMPANY1 COMPANY2
PRODUCT2 COMPANY3 COMPANY3

MANUFCO
MANUFACTURER MANUFACTURER_CODE MANUFACTURER_STATUS
COMPANY1 10001 MANUFACTURER
COMPANY3 10003 MANUFACTURER

DISTCO
DISTRIBUTOR DISTRIBUTOR_CODE DISTRIBUTOR_STATUS
COMPANY2 10000 DISTRIBUTOR
COMPANY3 10003 DISTRIBUTOR

OUTPUT
PRODUCTID COMPANY_CODE STATUS
PRODUCT1 10000 DISTRIBUTOR
PRODUCT1 10001 MANUFACTURER
PRODUCT2 10003 DIST/MANUF

Does anyone know how to do this?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.1.0.5
Windows 10
xls, csv, dbf
 
Posts: 10 | Location: France | Registered: November 24, 2009Report This Post
Guru
posted Hide Post
I think this is the solution direction:

JOIN MANUFACTURER IN MANUFCO TO MANUFACTURER IN PRODUCT AS J1

JOIN DISTRIBUTOR IN DISTCO TO DISTRIBUTOR IN PRODUCT AS J2

DEFINE FILE MANUFCO
COMPANY/A20= MANUFACTURER_CODE;
STATUS/A10=IF PRODUCT.MANUFACTURER EQ PRODUCT.DISTRIBUTOR THEN 'DIST/MANUF' ELSE 'MANUFACTURER';
END

DEFINE FILE DISTCO
COMPANY/A20= DISTRIBUTOR_CODE;
STATUS/A10='DISTRIBUTOR';
END

TABLE FILE MANUFACTURER
BY PRODUCTID
BY COMPANY
BY STATUS
MORE
FILE DISTRIBUTOR
WHERE PRODUCT.MANUFACTURER NE PRODUCT.DISTRIBUTOR
END


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report 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] Join and conditional define

Copyright © 1996-2020 Information Builders