The report below is an example of matching the Active Current Status (AC) file and the Transaction (TR) file. It identifies the name and address of current employees with a 505 (Retirement Status) transaction effective on a specific date. The hold file generated from the match (PERMLRG) is then 'dumped' into another hold file (PERMRPT) and formatted for downloading to Excel for use with a mail merge document. Refer to the comment lines in the report below for additional information.
-* THE LINES BELOW EXECUTE THE STANDARD DEFINES FOR AC & TR
EX AC
EX TR
-* THE LINES BELOW GATHER ADDRESS DATA FOR CURRENT EMPLOYEES
-* FROM THE AC FILE
MATCH FILE AC
PRINT AC:FRSTNAME AC:LASTNAME AC:STREET AC:CTYST AC:ZIP
BY AC:SSA AS 'SSA'
RUN
-* THE LINES BELOW IDENTIFY ALL EMPLOYEES WITH A 505 TRANS
-* FROM THE TR FILE
FILE TR
PRINT TR:WNAME
BY TR:SSA AS 'SSA'
IF TR:TRANCODE EQ 505
IF TR:EFFDATE EQ 10/01/2003
AFTER MATCH HOLD AS 'PERMLRG' OLD-AND-NEW
END
-* THE LINES BELOW CREATE A COMMA DELIMITED (LOTUS FORMAT)
-* FILE FROM THE MATCHED DATA
TABLE FILE PERMLRG
PRINT *
ON TABLE HOLD AS 'PERMRPT' FORMAT LOTUS
END
Last Updated: March 1, 2024