Payroll is one of the highest-stakes batch workloads on the mainframe. Employees expect correct deposits; finance expects GL tie-out; auditors expect reproducible registers with hash totals. Easytrieve appears throughout payroll portfolios—not always as the tax calculation engine, but reliably as the report generator for pay registers, deduction summaries, exception lists, and interfaces to accounts payable and general ledger. This tutorial describes typical payroll file layouts, how earnings and deduction codes flow through Easytrieve JOB logic, TABLE decodes for code descriptions, control break subtotals by department, validation for negative net pay, and operational practices that keep pay week from becoming crisis week.
Modern payroll often splits into calculation and reporting. An upstream job—COBOL, vendor package, or Easytrieve calculation member—reads time cards, applies tax tables, and writes a pay extract sequential file with one row per employee per pay period containing gross, each deduction, net, and bank deposit fields. Downstream Easytrieve reports read that extract and produce human-readable registers without recalculating tax unless your shop explicitly combines both roles in one program.
Understanding where calculation ends and reporting begins prevents double-applying deductions when you modify a register program. Read program header comments and operations runbook for the official split.
123456789101112FILE PAYEXTR EMP-ID 9 NUM EMP-NAME 30 A DEPT-CODE 3 NUM PAY-DATE 8 NUM GROSS-PAY 9.2 FED-TAX 7.2 STATE-TAX 7.2 FICA 7.2 NET-PAY 9.2 DED-CODE 2 A DED-AMT 7.2
Field names and sizes vary by shop. EMP-ID is employee identifier; GROSS-PAY and NET-PAY use decimal definitions for currency; DED-CODE and DED-AMT may repeat on separate deduction detail files in multi-file designs. Match DEFINE precision to extract—rounding mismatches between calculation and report are a common audit finding.
Registers print DED-CODE 401 next to amount 150.00—but supervisors want 401K RETIREMENT. TABLE lookup pattern applies: FILE DEDTAB TABLE with ARG matching DED-CODE and DESC for printable text. SEARCH in JOB before PRINT populates DED-DESC on each detail line.
12345678910111213FILE DEDTAB TABLE 50 DISK ARG 2 A DESC 25 A JOB INPUT PAYEXTR SEARCH DEDTAB WITH DED-CODE GIVING DED-DESC IF NOT DEDTAB DED-DESC = 'UNKNOWN DEDUCTION' PERFORM LOG-DED-EXCEPTION END-IF ADD GROSS-PAY TO W-TOTAL-GROSS ADD NET-PAY TO W-TOTAL-NET W-REC-CNT = W-REC-CNT + 1
Accumulators W-TOTAL-GROSS and W-TOTAL-NET feed report trailer or TITLE lines for control tie-out. LOG-DED-EXCEPTION. PROC increments W-BAD-DED-CNT and writes exception detail to a separate FILE for HR to fix master deduction codes.
Pay registers group employees by department for manager review. SORT pay extract by DEPT-CODE before report JCL or rely on input order from upstream. REPORT activity defines control break on DEPT-CODE with AFTER-BREAK printing subtotals of gross and net. SEARCH DEPTTAB WITH DEPT-CODE GIVING DEPT-NAME for break headings.
| Report | Audience | Typical content |
|---|---|---|
| Pay register | Payroll supervisors | Employee detail, earnings, deductions, net |
| Department summary | Finance managers | Subtotals by cost center |
| Deduction register | Benefits admin | Totals per deduction code |
| Exception list | HR clerks | Invalid codes, zero net, missing bank |
| GL interface | General ledger | Summarized debit/credit records |
Encapsulate rules in VALIDATE-PAY-REC. PROC with W-ERROR-FLAG contract. Payroll mistakes are visible and emotional; automated guards reduce recall events.
Operations compares W-REC-CNT to trailer count on pay extract. W-TOTAL-GROSS and W-TOTAL-NET match finance spreadsheet from calculation system. Some jobs write control records to GDG dataset PAY.CONTROL for automated monitoring. TITLE or final LINE prints hash totals operators initial on run sheet.
12345TITLE 'PAY REGISTER CONTROL' 'RECORDS:' W-REC-CNT 'GROSS:' W-TOTAL-GROSS 'NET:' W-TOTAL-NET 'EXCEPTIONS:' W-BAD-DED-CNT
12345678//PAYREG EXEC PGM=EZTPA00,REGION=0M //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=HR.PAY.LIB(EZTPREG),DISP=SHR //PAYEXTR DD DSN=HR.PAY.WEEKLY(+1),DISP=SHR //DEDTAB DD DSN=HR.PAY.DED.CODES,DISP=SHR //DEPTTAB DD DSN=HR.PAY.DEPT.CODES,DISP=SHR //RPTOUT DD SYSOUT=(1,INTRDR) //EXCEPT DD DSN=HR.PAY.EXCEPT(+1),DISP=(,CATLG,DELETE)
DEDTAB and DEPTTAB external TABLE files allow benefits team to update codes without recompiling register program—when codes change mid-year, refresh table dataset and rerun.
Weekly jobs stress volume and tight windows; monthly jobs add commission and benefit true-ups; year-end adds W-2 support registers and archival formats. Easytrieve members may multiply by period type sharing COMMON PROC macros for validation while varying REPORT masks for legal wording on year-end headers.
Pay extracts contain PII and salary data. Restrict dataset profiles, mask test files, and avoid DISPLAY of full SSN in production listings. Report TITLE may show last-four only when policy requires. Exception files need same protection as source extract.
Payroll Easytrieve is like printing paycheck stubs for every worker after a calculator figured how much each person earns. The calculator writes numbers on a list. Easytrieve reads the list, looks up what deduction codes mean, groups people by team, and prints a neat notebook the boss checks before money goes to the bank. If a code makes no sense, it goes on a problem list instead of the main notebook.
1. Payroll Easytrieve jobs most often read:
2. Deduction codes on pay extracts are commonly decoded with:
3. Pay register control totals typically include:
4. Negative net pay on a register usually triggers:
5. Department subtotals on pay registers use: