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     Display data in excel from 2 Hold Files..like Full Join

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Display data in excel from 2 Hold Files..like Full Join
 Login/Join
 
Member
posted
Hi,

I have created 2 Hold Files which has the same concatenated Key..(Bank name+Currency+Account) All charcters...Now i need to display data in the final report from the 2 hold files...

So display report in the sorted Key i have and first row of data from the first hold file and 2nd row from the second hold file..which has same key combination record...

What i am doing is after the Hold file i created a Full outer Join with the Key then tried to created the report..But it seems not working...

This is my code...
First Hold File
----------------------

TABLE FILE H_MT940F
PRINT
'H_MT940F.H_MT940F.CORR_INSTITUTION_NAME' AS 'BANK NAME'
'H_MT940F.H_MT940F.X_FIN_CCY' AS 'CURRENCY'
'H_MT940F.H_MT940F.MF25' AS 'ACCOUNT'
'H_MT940F.H_MT940F.MESG_TYPE' AS 'MESG TYPE'
'H_MT940F.H_MT940F.VALUE' AS 'COUNT'
BY TOTAL COMPUTE KEY_MT940F/A500 = H_MT940F.H_MT940F.CORR_INSTITUTION_NAME || H_MT940F.H_MT940F.X_FIN_CCY || H_MT940F.H_MT940F.MF25 ; NOPRINT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS H_940F FORMAT ALPHA
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *

Second Hold File
-----------------

TABLE FILE H_MT942F
PRINT
'H_MT942F.H_MT942F.CORR_INSTITUTION_NAME' AS 'BANK NAME'
'H_MT942F.H_MT942F.X_FIN_CCY' AS 'CURRENCY'
'H_MT942F.H_MT942F.MF25' AS 'ACCOUNT'
'H_MT942F.H_MT942F.MESG_TYPE' AS 'MESG TYPE'
'H_MT942F.H_MT942F.VALUE' AS 'COUNT''
BY TOTAL COMPUTE KEY_MT942F/A500 = H_MT942F.H_MT942F.CORR_INSTITUTION_NAME || H_MT942F.H_MT942F.X_FIN_CCY || H_MT942F.H_MT942F.MF25; NOPRINT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS H_942F FORMAT ALPHA
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *


Then Do the Join

JOIN
H_940F.H_940F.KEY_MT940F IN H_940F TO MULTIPLE H_942F.H_942F.KEY_MT942F
IN H_942F TAG J7 AS J7
END

The have to have the final report
TABLE FILE H_940F
PRINT
'H_940F.H_940F.CORR_INSTITUTION_NAME'
'H_940F.H_940F.X_FIN_CCY'
'H_940F.H_940F.MF25'
'H_940F.H_940F.MESG_TYPE'
'H_940F.H_940F.VALUE'
BY 'H_940F.H_940F.KEY_MT940F'

My output data should be like

ABN AMRO BANK N.V. EUR 568096169 940 14
ABN AMRO BANK N.V. EUR 568096169 942 07

One from each hold file categorized by the First 3 columns...

I tried with Match but somehow i cannot open with match file with this Hold file..I am getting this Hold file from around 4 preceiding match files..

Please update me what to be done to make this work...


WebFOCUS 76
Windows
all formats
 
Posts: 18 | Registered: September 14, 2009Report This Post
Expert
posted Hide Post
Here's how I would do it. You need to merge the two hold files, not with MATCH or JOIN, but with MORE. Append a character to the end of the key field you're creating and ensure the names of all the fields in the two files are the same. Something like this:

-* First Hold File

TABLE FILE H_MT940F
PRINT
'H_MT940F.H_MT940F.CORR_INSTITUTION_NAME'
'H_MT940F.H_MT940F.X_FIN_CCY'
'H_MT940F.H_MT940F.MF25'
'H_MT940F.H_MT940F.MESG_TYPE'
'H_MT940F.H_MT940F.VALUE'

BY TOTAL COMPUTE BANK_KEY/A501 = H_MT940F.H_MT940F.CORR_INSTITUTION_NAME | H_MT940F.H_MT940F.X_FIN_CCY | H_MT940F.H_MT940F.MF25 | '1';

ON TABLE HOLD AS H_940F FORMAT ALPHA
END
-RUN

-* Second Hold File

TABLE FILE H_MT942F
PRINT
'H_MT942F.H_MT942F.CORR_INSTITUTION_NAME'
'H_MT942F.H_MT942F.X_FIN_CCY'
'H_MT942F.H_MT942F.MF25'
'H_MT942F.H_MT942F.MESG_TYPE'
'H_MT942F.H_MT942F.VALUE'

BY TOTAL COMPUTE BANK_KEY/A501 = H_MT942F.H_MT942F.CORR_INSTITUTION_NAME | H_MT942F.H_MT942F.X_FIN_CCY | H_MT942F.H_MT942F.MF25 | '2';

ON TABLE HOLD AS H_942F FORMAT ALPHA
END
-RUN

-* The final report

TABLE FILE H_940F
PRINT
CORR_INSTITUTION_NAME
X_FIN_CCY
MF25
MESG_TYPE

BY BANK_KEY NOPRINT

MORE
FILE H_942F
END
-RUN

If you're using the GUI to develop the report, unfortunately, I don't think it can handle the MORE statement.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Thank you very much Francis ...I got it right...


WebFOCUS 76
Windows
all formats
 
Posts: 18 | Registered: September 14, 2009Report 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     Display data in excel from 2 Hold Files..like Full Join

Copyright © 1996-2020 Information Builders