May 29, 2008, 10:22 AM
Majid JeddiExample 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
May 29, 2008, 10:45 AM
Mike HoneycuttInstead of:
AFTER MATCH HOLD OLD-OR-NEW
Try:
AFTER MATCH HOLD
AS HOLD OLD-OR-NEW
Mike Honeycutt
May 29, 2008, 10:49 AM
Tom FlynnMORE 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
May 29, 2008, 10:51 AM
GinnyJakesquote:
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.