ATTENDHIST – Employee Attendance History

System
Time and Attendance (TM)
Prefix
ATH
Primary key
COMPANY, DATE, ATTEND-CODE, EMPLOYEE, TIME-SEQ
Fields
15
Updated by
9 programs
Referenced by
15 programs

ATTENDHIST is the Employee Attendance History table in Lawson Time and Attendance (prefix ATH). It is indexed by COMPANY, DATE, ATTEND-CODE, EMPLOYEE, TIME-SEQ (ATHSET1); alternate indexes: ATHSET2, ATHSET3, ATHSET4 and ATHSET5. It is related 1:1 to ATTENDCODE, PRSYSTEM, DEPTCODE, EMPLOYEE and PAEMPLOYEE and 1:M to PRTIME and TAEEMASTER. It is updated by PR195, PR197, PR582, PR82.1, PR85.1, TM300, TM570, TM70.1 and 1 more and referenced by HR170, HR70.1, TM01.1, TM240, TM245, TM250, TM255, TM260 and 7 more. The table has 15 fields, 5 indexes and 8 documented relations.

About ATTENDHIST

The Attendance History file contains employee attendance history information. TM70 (Attendance History) and PR199 (Payroll Close) are the primary programs that update this file. More than one attendance record can exist for an employee for the same day. For this reason a sequence number is needed to maintain record uniqueness.

Fields (15)

Column = COBOL field name without the ATH- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored. PK = primary key (present in every index); SETn = leading/alternate key of that index.

Field / columnTypeDescription & valuesUpdated by
#ATH-COMPANY PK
COMPANY
Numeric 4Contains the company number. Validated in the HR Company and Process Levels file.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-DATE PK
DATE
Numeric 8 (yyyymmdd)Contains the system date this record was created.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-ATTEND-CODE PK
ATTEND_CODE
Alpha 2Contains the user-defined alphanumeric code that represents a reason for an employee's absence or hours worked. Examples of attendance codes are, sick, vacation, overtime, on the job injury, snow day, tardy, left early, and so on. Validated in the Attendance Code file.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-EMPLOYEE PK
EMPLOYEE
Numeric 9Contains the employee number associated with this attendance record. Validated in the Employee file.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-TIME-SEQ PK
TIME_SEQ
Numeric 12Contains the system-assigned number that makes the record unique.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-PROCESS-LEVEL
PROCESS_LEVEL
Alpha 5Contains the process level with which this attendance record is associated. Validated in the HR Company and Process Levels file.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-DEPARTMENT
DEPARTMENT
Alpha 5Contains the department with which this attendance record is associated. Validated in the Department file.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-HOURS
HOURS
Signed 7.2Contains the hours associated with this attendance code. PR199 (Payroll Close) creates attendance history for time records with an attendance code attached. Hours is an optional entry for manual type records.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-POINTS
POINTS
Signed 7.2Contains the points associated with the attendance code. The value in this field defaults from the Points field in the Attendance Code file. You can override Points in TM70 (Attendance History) if appropriate.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-OCCURRENCE
OCCURRENCE
Alpha 1Contains the value that indicates whether this record is a unique attendance occurrence or a continuation of a previous occurrence. For example, if an employee is sick on Monday and Thursday, this is considered two occurrences. If an employee is sick on Monday and Tuesday, Monday is considered an occurrence and Tuesday is not since it is a continuation of Mondays occurrence.
  • N No
  • Y Yes
PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-RECORD-TYPE
RECORD_TYPE
Alpha 1Contains the value that identifies the record type. Attendance history records created by PR199 (Payroll Close) are system records. Records added or changed through TM70 (Attendance History) are manual records.
  • M Manual
  • S System
PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-DAYS-IND
DAYS_IND
Numeric 1Contains the numeric value that represents the day of the week on which the occurrence took place.
  • 1 Sun
  • 2 Mon
  • 3 Tue
  • 4 Wed
  • 5 Thu
  • 6 Fri
  • 7 Sat
PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-DATE-STAMP SET5
DATE_STAMP
Numeric 8 (yyyymmdd)This field contains the server date (month, date, and year) of the last change to this record.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-TIME-STAMP
TIME_STAMP
Numeric 6 (hhmmss)Contains the server time (hour, minute, and second) when the record was last changed.PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1
#ATH-USER-ID
USER_ID
Alpha 10 (Lower Case)—PR195, PR197, PR582, PR82.1, PR85.1, TM570, TM70.1, TM71.1

Indexes (5)

Keys are listed in index order; ↓ marks a descending key. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
ATHSET1
  1. COMPANY
  2. DATE
  3. ATTEND-CODE
  4. EMPLOYEE
  5. TIME-SEQ
PrimaryTM240, TM245, TM300, TM52.1, TM570, TM70.1, TM71.1
ATHSET2
  1. COMPANY
  2. EMPLOYEE
  3. DATE ↓
  4. ATTEND-CODE
  5. TIME-SEQ ↓
HR170, HR70.1, TM300, TM470, TM50.1, TM50.2, TM52.1, TM60.1 +3 more
ATHSET3
  1. COMPANY
  2. ATTEND-CODE
  3. DATE ↓
  4. EMPLOYEE
  5. TIME-SEQ ↓
TM01.1, TM240, TM245, TM250, TM255, TM260, TM265, TM300 +1 more
ATHSET4
  1. COMPANY
  2. EMPLOYEE
  3. ATTEND-CODE
  4. DATE ↓
  5. TIME-SEQ ↓
TM240, TM245, TM250, TM255, TM260, TM265, TM470, TM50.1 +1 more
ATHSET5
  1. COMPANY
  2. DATE ↓
  3. DATE-STAMP ↓
  4. ATTEND-CODE
  5. EMPLOYEE
  6. TIME-SEQ
KeyChange—

Relations

Relationship map — 1:1 lookups/parents on the left, 1:M children on the right (up to 14 each)
ATTENDCODEPRSYSTEMDEPTCODEEMPLOYEEPAEMPLOYEEPRTIMETAEEMASTERATTENDHIST

One to one (6) — lookups and parents

RelationTableRulesConditionField map
Attend CodeATTENDCODERequired
ATH-COMPANY→ATC-COMPANY (ATCSET1)
ATH-ATTEND-CODE→ATC-ATTEND-CODE
CompanyPRSYSTEMRequired
ATH-COMPANY→PRS-COMPANY
Spaces→PRS-PROCESS-LEVEL
DepartmentDEPTCODERequiredWhen ATH-DEPARTMENT != Spaces
ATH-COMPANY→DPT-COMPANY
ATH-PROCESS-LEVEL→DPT-PROCESS-LEVEL
ATH-DEPARTMENT→DPT-DEPARTMENT
EmployeeEMPLOYEERequired
ATH-COMPANY→EMP-COMPANY
ATH-EMPLOYEE→EMP-EMPLOYEE
PaemployeePAEMPLOYEERequired
ATH-COMPANY→PEM-COMPANY
ATH-EMPLOYEE→PEM-EMPLOYEE
Process LevelPRSYSTEMRequiredWhen ATH-PROCESS-LEVEL != Spaces
ATH-COMPANY→PRS-COMPANY
ATH-PROCESS-LEVEL→PRS-PROCESS-LEVEL

One to many (2) — child tables

RelationTableRulesConditionField map
PrtimePRTIMEValid When (ATH-RECORD-TYPE = "S")
ATH-COMPANY→PRT-COMPANY
ATH-EMPLOYEE→PRT-EMPLOYEE
ATH-DATE→PRT-TR-DATE
ATH-TIME-SEQ→PRT-TIME-SEQ
—→PRT-CHECK-ID
TaeemasterTAEEMASTER
ATH-COMPANY→TEM-COMPANY
—→TEM-EMPLOYEE
—→TEM-PLAN
—→TEM-EMPLOYEE-GROUP
—→TEM-POSITION

Programs

Updated by (9)

Referenced by (15)