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.

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
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 marked * are descending. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
ATHSET1COMPANY, DATE, ATTEND-CODE, EMPLOYEE, TIME-SEQPrimaryTM240, TM245, TM300, TM52.1, TM570, TM70.1, TM71.1
ATHSET2COMPANY, EMPLOYEE, DATE*, ATTEND-CODE, TIME-SEQ*HR170, HR70.1, TM300, TM470, TM50.1, TM50.2, TM52.1, TM60.1 +3 more
ATHSET3COMPANY, ATTEND-CODE, DATE*, EMPLOYEE, TIME-SEQ*TM01.1, TM240, TM245, TM250, TM255, TM260, TM265, TM300 +1 more
ATHSET4COMPANY, EMPLOYEE, ATTEND-CODE, DATE*, TIME-SEQ*TM240, TM245, TM250, TM255, TM260, TM265, TM470, TM50.1 +1 more
ATHSET5COMPANY, DATE*, DATE-STAMP*, ATTEND-CODE, EMPLOYEE, TIME-SEQKeyChange

Relations

One to one (6) — lookups and parents

RelationTableRulesConditionField map
Attend CodeATTENDCODERequiredATH-COMPANYATC-COMPANY (ATCSET1), ATH-ATTEND-CODEATC-ATTEND-CODE
CompanyPRSYSTEMRequiredATH-COMPANYPRS-COMPANY, SpacesPRS-PROCESS-LEVEL
DepartmentDEPTCODERequiredWhen ATH-DEPARTMENT != SpacesATH-COMPANYDPT-COMPANY, ATH-PROCESS-LEVELDPT-PROCESS-LEVEL, ATH-DEPARTMENTDPT-DEPARTMENT
EmployeeEMPLOYEERequiredATH-COMPANYEMP-COMPANY, ATH-EMPLOYEEEMP-EMPLOYEE
PaemployeePAEMPLOYEERequiredATH-COMPANYPEM-COMPANY, ATH-EMPLOYEEPEM-EMPLOYEE
Process LevelPRSYSTEMRequiredWhen ATH-PROCESS-LEVEL != SpacesATH-COMPANYPRS-COMPANY, ATH-PROCESS-LEVELPRS-PROCESS-LEVEL

One to many (2) — child tables

RelationTableRulesConditionField map
PrtimePRTIMEValid When (ATH-RECORD-TYPE = "S")ATH-COMPANYPRT-COMPANY, ATH-EMPLOYEEPRT-EMPLOYEE, ATH-DATEPRT-TR-DATE, ATH-TIME-SEQPRT-TIME-SEQ, PRT-CHECK-ID
TaeemasterTAEEMASTERATH-COMPANYTEM-COMPANY, TEM-EMPLOYEE, TEM-PLAN, TEM-EMPLOYEE-GROUP, TEM-POSITION

Programs

Updated by (9)

Referenced by (15)