Focal Point
[SOLVED]Match without After Match statement

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/196100092

November 11, 2009, 06:38 AM
Jinx
[SOLVED]Match without After Match statement
Hi,

I have come across a report written some years ago, that has a match done in a strange way. I've never seen it done this way and am unsure if it is correct or not, as I have to rewrite it using DB2 SQL. Normally, when I write a match, and from what I see in my wfs book one should have a statement like the following at the end:
AFTER MATCH HOLD OLD-OR-NEW (depending on that you want)  


Could someone possibly tell me why a match would be done like this:

 
MATCH FILE TABLE1
PRINT DATE
      AMOUNT
   BY NUMBER
RUN
FILE TABLE1
SUM AMOUNT2
   BY NUMBER
RUN
FILE TABLE1
SUM CODE
   BY PINNUMB
   ON TABLE HOLD AS HOLD1 MISSING OFF
END
-RUN 


I'm baffled!

Thanks,

Jinx.

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


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
November 11, 2009, 07:04 AM
GamP
Well, there are actually two things wrong here.
The last BY is on a completely different field which will defenitely produce undesired results (if not an error message nowadays).
The AFTER MATCH is also not present, as you noticed. But that is not too bad, it will revert to the default which is OLD-OR-NEW.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 11, 2009, 08:01 AM
Jinx
Oh, thanks for that. I didn't know it defaults to OLD-OR-NEW.
As for the by mistake - that's my bad, I simplified the code and forgot to change that one field when adding my post ^^.

Thanks again.


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2