The sample request below is based on feedback we received from last month's article about identifying the Original Hire Date For Current Employees. This report identifies active/onleave employees who have a blank value for employment date and/or who have multiple position sequences with different employment dates. A partial report is shown below. The complete report request is available in the CIRS common library as FOC5008.
PSN EMPLOYMENT CURRENT POSITION EMPLOYEE SOCIAL SEQ DATE NUMBER -------- ------ --- ---------- ---------------- ANACONDA, CLAUDE 456-78-9123 01 09/19/1989 000-031-2360-001 02 09/01/2004 000-040-2481-005 ARDVARK, SUSAN 789-01-2345 01 10/01/2003 000-076-2354-007 03 08/29/2005 000-067-1032-005 BEAR, JOE 123-45-6789 01 000-088-1032-002 |
Part 1
To begin, the Active Current Status (AC) file is used to identify all active/onleave position sequences and their associated employment date for your current employees. The data is then held to your PERMSML file for further processing.
EX AC
TABLE FILE AC
PRINT AC:EMPDATE
BY AC:SSA
BY AC:PSNSEQ
ON TABLE HOLD AS PERMSML
END
Part II
Using the data held in PERMSML, a define is written to identify all employees who have a blank value for employment date, and/or different employment dates if they have multiple active/onleave position sequences.
DEFINE FILE PERMSML
FLAG/A3 = IF AC:EMPDATE EQ ' ' THEN 'YES' ELSE
IF (AC:SSA EQ LAST AC:SSA) AND (AC:EMPDATE NE LAST AC:EMPDATE)
THEN 'YES' ELSE 'NO';
END
Part III
A match is used between the data held in PERMSML and the AC file to get all position and employment dates for 'flagged' employees with blank values or multiple employment dates.
MATCH FILE PERMSML
PRINT FLAG
BY AC:SSA
IF FLAG EQ 'YES'
RUN
-*
FILE AC
PRINT AC:WNAME AC:DAO AC:PSNSEQ AC:POSIT16 AC:EMPDATE
BY AC:SSA
AFTER MATCH HOLD AS PERMRPT OLD
END
Part IV:
The final report is generated from the matched data held in PERMRPT. It is written to produce a printed report, but it can be modified to produce a hold file by un-commenting the ON TABLE HOLD.... line before the END command. Please note that all formatting will be lost if a hold file in a lotus format is created.
TABLE FILE PERMRPT
HEADING CENTER
"ACTIVE/ONLEAVE EMPLOYEES WITH BLANK OR MULTIPLE EMPLOYMENT DATES"
"COMMON FOCEXEC: FOC5008"
"DATA AS OF: <AC:DAO"
PRINT AC:EMPDATE AS 'EMPLOYMENT DATE'
AC:POSIT16 AS 'CURRENT POSITION,NUMBER'
BY AC:WNAME AS 'EMPLOYEE'
BY AC:SSA AS 'SOCIAL'
BY AC:PSNSEQ AS 'PSN,SEQ'
ON AC:SSA SKIP-LINE
-* ON TABLE HOLD AS PERMLRG FORMAT LOTUS
END
Last Updated: March 1, 2024