Easytrieve Batch Reconciliation Projects

Batch reconciliation answers: do these two files agree? Finance asks whether the accounts payable sub-ledger matches the general ledger control account. Treasury asks whether bank statement entries match internal cash receipts. Operations asks whether the payment file matches open invoices. Easytrieve excels at sorted two-file compare: walk both files in key order, classify exact matches, flag amount variances, and list records present on only one side. Exception reports drive clerical research or automated retry before period close. This tutorial covers match key selection, merge-compare logic, amount tolerance, duplicate key policy, summary control pages, common banking and AP patterns, and sign-off when W-UNMATCH-CNT must be zero before downstream jobs run.

Progress0 of 0 lessons

Reconciliation Scenarios

Common reconciliation pairs
File AFile BMatch key
GL sub-ledger detailGL control summaryAccount number
Bank statementCash receiptsReference or check number
Open invoicesPayment fileInvoice number
Payroll registerBank disbursementEmployee id + pay date
Inventory systemWarehouse snapshotSKU + location

File Layouts for Compare

text
1
2
3
4
5
6
7
FILE FILEA MATCH-KEY 15 A AMT-A 11.2 FILE FILEB MATCH-KEY 15 A AMT-B 11.2

MATCH-KEY must sort identically on both files—same length, type, and padding rules. Amount fields may differ in name but must represent comparable values for variance check after key match. Align date in key when matching payments to daily batches.

Merge-Compare Algorithm

Classic pattern uses GET or dual FILE read logic comparing keys. When FILEA key equals FILEB key, PERFORM MATCH-FOUND. When FILEA key less than FILEB key, FILEA orphan—A-not-B. When FILEA key greater, FILEB orphan—B-not-A. Advance the file with lower key and repeat until both EOF.

text
1
2
3
4
5
6
7
8
9
10
11
12
MATCH-FOUND. PROC W-MATCH-CNT = W-MATCH-CNT + 1 IF AMT-A NE AMT-B W-VAR-CNT = W-VAR-CNT + 1 PERFORM PRINT-VARIANCE-LINE END-IF END-PROC ORPHAN-A. PROC W-ORPHAN-A-CNT = W-ORPHAN-A-CNT + 1 PRINT A-NOT-B-LINE END-PROC

Some implementations use single JOB with manual GET sequencing; others use MATCH macro or pre-merge SORT step producing match indicator file. Choose approach matching shop standards and maintainability.

Amount Tolerance

Pennies differ due to rounding or timing. Define W-TOL-AMT from PARM—variance within tolerance counts as matched for operations but may still PRINT informational line for audit. IF ABS(AMT-A minus AMT-B) GT W-TOL-AMT treat as variance exception. Document tolerance in program header and runbook.

Summary Control Page

text
1
2
3
4
5
6
7
TITLE 'RECONCILIATION CONTROL' 'FILE A READ:' W-READ-A-CNT 'FILE B READ:' W-READ-B-CNT 'MATCHED:' W-MATCH-CNT 'VARIANCES:' W-VAR-CNT 'A NOT B:' W-ORPHAN-A-CNT 'B NOT A:' W-ORPHAN-B-CNT

Identity check: W-READ-A-CNT should equal W-MATCH-CNT plus W-ORPHAN-A-CNT plus unmatched variance handling per policy when variance records still counted as matched keys. Operators verify before approving close.

Duplicate Key Policy

  • Fail job if duplicates detected in pre-SORT validation step.
  • Sum amounts on duplicate keys before compare when business allows aggregation.
  • Match first pair and exception remaining duplicates for manual split.

Document policy explicitly—silent wrong match on duplicates causes costly financial errors.

Three-Way Reconciliation

Some closes require three sources—invoice, receipt, GL posting. Options: chain two Easytrieve jobs passing matched subset file, or one job with three-file extension comparing after pairwise match. Start with two-file mastery before designing three-way in single pass.

Sample JCL

text
1
2
3
4
5
6
7
8
9
//RECON EXEC PGM=EZTPA00,REGION=0M //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=FIN.LIB(EZTRECON),DISP=SHR //FILEA DD DSN=FIN.SUBLED(+1),DISP=SHR //FILEB DD DSN=FIN.GLCTRL(+1),DISP=SHR //EXCEPT DD DSN=FIN.RECON.EX(+1),DISP=(,CATLG,DELETE) //PARM DD * 0.01 /*

Precede with SORT steps on MATCH-KEY for FILEA and FILEB. PARM passes tolerance amount 0.01 dollar.

Blocking Close on Exceptions

Conditional JCL or scheduler rule: if W-ORPHAN-A-CNT plus W-ORPHAN-B-CNT plus W-VAR-CNT greater zero, set non-zero return code via STOP or RCODE assignment if shop uses Easytrieve exit for RC. Finance holds period close until exceptions cleared or approved with documented override ticket.

Explain It Like I'm Five

Reconciliation is like checking two lists of lunch orders to make sure every name on the class list paid the right amount. You line up both lists alphabetically. When names match, you check the money matches. When a name is on only one list, you ask why. At the end you count how many matched and how many problems need fixing before recess.

Exercises

  1. Define FILEA and FILEB with MATCH-KEY and amount fields.
  2. Write MATCH-FOUND. PROC with amount variance check.
  3. Design control TITLE with six summary counters.
  4. Describe duplicate key policy for invoice-to-payment match.
  5. Explain pre-SORT requirement in two sentences for a beginner.

Frequently Asked Questions

Quiz

Test Your Knowledge

1. Batch reconciliation compares:

  • Two files on a common key
  • Compiler listing to JCL only
  • SCREEN maps
  • MACRO libraries

2. Both files must be sorted by match key because:

  • Merge compare requires ascending key order
  • REPORT requires random order
  • TABLE SEARCH forbids sort
  • SORT is optional always

3. Unmatched record from file A only appears on:

  • Exception report as A-not-in-B
  • Success register only
  • TITLE line
  • MACRO output

4. Amount tie-out after key match checks:

  • Amount fields equal within tolerance
  • Record length equal only
  • Same compile date
  • Same JCL name

5. Zero exception count often means:

  • Job may proceed to close or next step
  • Delete both input files
  • Skip control totals
  • Disable audit
Published
Read time19 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Mainframe batch reconciliation and file match patterns with EasytrieveSources: Broadcom Easytrieve 11.6 multi-file processing, financial close practicesApplies to: Easytrieve batch reconciliation and tie-out projects