Focal Point
Example from the documentation

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

May 29, 2008, 10:22 AM
Majid Jeddi
Example from the documentation
Hi

I am reading the documentation and trying to use one listed example in order to understand MATCH AND MORE. Unfortunatelly i am getting an error saying no description found for HOLD.
Can you please help me.
Regards:

DEFINE FILE EMPDATA
CURR_SAL/D12.2M = CSAL;
FIRST_NAME/A10 = FN;
EID/A9 = PIN;
END
-*Start MATCH. 2.
MATCH FILE EMPLOYEE
SUM CURR_SAL AS 'CURRENT'
FIRST_NAME AS 'FIRST'
BY EID AS 'SSN'
-*Concatenate file EMPDATA to EMPLOYEE to form first MATCH answer set.3.
MORE FILE EMPDATA
RUN
-*Second MATCH answer set:
FILE TRAINING
PRINT EXPENSES
BY PIN AS 'SSN'
AFTER MATCH HOLD OLD-OR-NEW
END
-*Print merged file: 7.
TABLE FILE HOLD
PRINT *
END


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
May 29, 2008, 10:45 AM
Mike Honeycutt
Instead of:
AFTER MATCH HOLD OLD-OR-NEW

Try:
AFTER MATCH HOLD AS HOLD OLD-OR-NEW


Mike Honeycutt


WebFocus 7.6.6, Windows
May 29, 2008, 10:49 AM
Tom Flynn
MORE is on a line by itself, outside of that, GOOD JOB...

DEFINE FILE EMPDATA
CURR_SAL/D12.2M = CSAL;
FIRST_NAME/A10 = FN;
EID/A9 = PIN;
END
-*Start MATCH. 2.
MATCH FILE EMPLOYEE
SUM CURR_SAL AS 'CURRENT'
FIRST_NAME AS 'FIRST'
BY EID AS 'SSN'
-*Concatenate file EMPDATA to EMPLOYEE to form first MATCH answer set.3.
MORE
FILE EMPDATA

RUN
-*Second MATCH answer set:
FILE TRAINING
PRINT EXPENSES
BY PIN AS 'SSN'
AFTER MATCH HOLD OLD-OR-NEW
END
-*Print merged file: 7.
TABLE FILE HOLD
PRINT *
END

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
May 29, 2008, 10:51 AM
GinnyJakes
quote:
MORE FILE EMPDATA


You get an error on this line which is why the HOLD file isn't created and why you get the error. When I run the code you posted, I get two errors.

Check the doc again. I probably wouldn't do it this way. I'd do the concat first then the match.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
May 29, 2008, 11:01 AM
Majid Jeddi
Hi Tom,

Thanks it works.
Thanks also to Ginny.

Regards


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server