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     [SOLVED]MERGE Phrase NEW-NOT-OLD Problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]MERGE Phrase NEW-NOT-OLD Problem
 Login/Join
 
Gold member
posted
Hi all,
I am trying to merge two files using the MATCH phrase. I would like to save records that appear only in the new data. I read about this and think that I must use NEW-NOT-OLD merge type.

Here is data in the old:
TABLE FILE EMPLOYEE
  SUM EMPLOYEE.EMPLOYEE.RPTMONTH
  BY EMPLOYEE.EMPLOYEE.DIVISION
END




PAGE 1

DIVISION	RPTMONTH
AF	2013/02/01 00:00:00.000
ASD	2013/02/01 00:00:00.000
CFSD	2013/02/01 00:00:00.000
CW	2013/02/01 00:00:00.000
DCC	2013/02/01 00:00:00.000
DDSD	2013/02/01 00:00:00.000
DSD	2013/02/01 00:00:00.000
Exec	2013/02/01 00:00:00.000
FIN	2013/02/01 00:00:00.000
I&R	2013/02/01 00:00:00.000
OBQ	2013/02/01 00:00:00.000
OCC	2013/02/01 00:00:00.000
OCSS	2013/02/01 00:00:00.000
OIG	2013/02/01 00:00:00.000
OSS	2013/02/01 00:00:00.000



Here is data in the new:
TABLE FILE TOP50_DIVISION
  BY TOP50_DIVISION.TOP50_DIVISION.DIV_CD
AFTER MATCH HOLD NEW-NOT-OLD
END




PAGE 1

DIV_CD
AF
ASD
Admin
CFSD
CW
DCC
DDSD
DSD
Exec
FIN
GC
I&R
OBQ
OCC
OCSS
OIG
OSS
XX
YY




Here is the complete Merge code:
MATCH FILE EMPLOYEE
  SUM EMPLOYEE.EMPLOYEE.RPTMONTH
  BY EMPLOYEE.EMPLOYEE.DIVISION
RUN
FILE TOP50_DIVISION
  BY TOP50_DIVISION.TOP50_DIVISION.DIV_CD
AFTER MATCH HOLD NEW-NOT-OLD
END

TABLE FILE HOLD
BY 'HOLD.HOLD.DIV_CD'
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END



Here is the result from the merge:

DIV_CD 
  
AF 
ASD 
Admin 
CFSD 
CW 
DCC 
DDSD 
DSD 
Exec 
FIN 
GC 
I&R 
OBQ 
OCC 
OCSS 
OIG 
OSS 
XX 
YY 



I was hoping to get the following result instead:

DIV_CD

Admin
GC
XX
YY


I believe, I should have gotten ‘Admin’, ‘GC’,’XX’, and ‘YY’. Can anyone tell why I am not getting just these 4 division codes? These 4 are the only ones that are in the new but not the old file.

Thank you for your input,

Seyed

This message has been edited. Last edited by: SeyedG,
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
Virtuoso
posted Hide Post
When using MATCH logic, the columns being matched must have the same name - otherwise you basically get a merging of the two datasets.

MATCH FILE EMPLOYEE
  SUM EMPLOYEE.EMPLOYEE.RPTMONTH
  BY EMPLOYEE.EMPLOYEE.DIVISION AS 'DIV_CD'
RUN
FILE TOP50_DIVISION
  BY TOP50_DIVISION.TOP50_DIVISION.DIV_CD
AFTER MATCH HOLD NEW-NOT-OLD
END

Or....

MATCH FILE EMPLOYEE
  SUM EMPLOYEE.EMPLOYEE.RPTMONTH
  BY EMPLOYEE.EMPLOYEE.DIVISION
RUN
FILE TOP50_DIVISION
  BY TOP50_DIVISION.TOP50_DIVISION.DIV_CD AS 'DIVISION'
AFTER MATCH HOLD NEW-NOT-OLD
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
Hi Dan,
Thank you very much for taking time to assist me with this. Per your suggestion, I gave the division column an alias called 'DIV_CD' and that fixed the MATCH logic and I got the correct result.

Thanks again and continued success,

Seyed


WebFOCUS 8.0.09
App Studio 8009
Linux Kernel-2.6
DBMS: Oracle 11g
all output (Excel, HTML, AHTML, PDF)
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report 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     [SOLVED]MERGE Phrase NEW-NOT-OLD Problem

Copyright © 1996-2020 Information Builders