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     [CLOSED]MATCH problem
Go
New
Search
Notify
Tools
Reply
  
[CLOSED]MATCH problem
 Login/Join
 
Member
posted
Hello everyone,
I have an issue with matching two files and for some reason, it generates an error when running the report. The error is:

(FOC063) WARNING. MATCH FIELDS HAVE SAME NAME BUT DIFFERENT FORMATS: PC_ID


-DEFAULT &STARTDT = '20150201';
-DEFAULT &ENDDT = '20150701';

JOIN ID IN PTD TO ALL ID IN PER AS JOIN1
JOIN TYP IN PTD TO ALL ER_ID IN ER AS JOIN2
-*
DEFINE FILE PTD
RID/A10=GETTOK(ID,23,3,'*',10,RID);
PC/A2=GETTOK(ID,23,2,'*',2,PC);
END
-*
TABLE FILE PTD
PRINT
RID
P_DAT
PC_DAT
COMPUTE ND/MDYY = IF PCD EQ MISSING THEN PAD ELSE PCD;
COMPUTE PPD /MDYY = IF PCD EQ MISSING THEN PAD ELSE PCD;
PA
PTET
E_DES
PP_DEP
PGN/A30 AS AGA_ID
PC
PC AS PC_ID
BY RID NOPRINT
WHERE PA GT 0
WHERE (PAD LE '&ENDDT' AND PAD GE '&STARTDT') OR  (PCD LE '&ENDDT' AND PCD GE '&STARTDT')
ON TABLE HOLD AS PART1
END
-*
MATCH FILE PART1
PRINT
RID
P_DAT
PC_DAT
ND
PA
PTET
E_DES
PP_DEP
PGN
PC
BY PC_ID
BY PPD
RUN
FILE TABLEX
SUM
PSD
PED
BY PC_ID
BY PPD
AFTER MATCH HOLD AS PART2
END
.
.
.
.
.


The problem is with "PC_ID" field. Its format in TABLEX is "A2V" and ID format in PTD is "A23V". I tried to make PC "A2V" but get the same error. I am stuck at this point. Any ideas?

Ali

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS Developer Studio 8104 / Windows 7 / HTML and Excel
 
Posts: 16 | Registered: August 11, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
Use a DEFINE to create a field on both files with the same format.


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
I did DEFINE the file and assigned the appropriate format to PC in the beginning. Then I gave PC an alias in the HOLD file. The second file used in MATCH has a filed named PC that has the same format as the defined first field.
Where do you suggest I Define the file. Also, do I need to do it for the Hold file or the original file?

Ali


WebFOCUS Developer Studio 8104 / Windows 7 / HTML and Excel
 
Posts: 16 | Registered: August 11, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Both fields PC_ID and PPD from both files PART1 and TABLEX need to have the same format.

In other words:

PART1.PC_ID same format as TABLEX.PC_ID or vice versa
and
PART1.PPD same format as TABLEX.PPD or vice versa

In a MATCH, all same BY field across files must have the same format, name and be in the same order.

The BY fields are the "key" to match your files so they need to be placed in the same order, have the same format and have the same name.

At worst for the name you can do something such as:
MATCH FILE Y
PRINT Fld1
BY Fld2 AS 'BY1'
BY Fld3 AS 'BY2'
RUN
FILE Y
PRINT Fld9
BY BY1
BY BY2
AFTER MATCH HOLD AS Z OLD-AND-NEW
END


It is also important to provide the Matching verb that you want:
OLD-OR-NEW
OLD-AND-NEW
OLD-NOR-NEW
OLD-NOT-NEW
NEW-NOT-OLD
OLD
NEW

It will avoid confusion on action performed by the MATCH.


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2234 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]MATCH problem

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