---
title: Output control tracking
summary: Tracks the print/transmission status of generated payment output artifacts (e.g., checks, ACH files) via OUTPUT_CONTROL records.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.Payment.EFT
reference_type: package
operation_id: OP-EFT-06
trigger: Batch/output process creates a clsOutputControl record when a payment output artifact (check run, ACH file) is generated, and updates it once the artifact has been printed/transmitted
---

# Output control tracking

`clsOutputControl` is the only genuine create/update/delete business object involved in tracking output generation in this library — it records one row per generated output artifact (e.g., a check-print run or an ACH file) and whether that artifact has since been printed/transmitted. Two related classes, `clsAchFileID` and `clsPaymentBatchNumber`, are read-only reference/code tables rather than per-run transactional records: `clsAchFileID` looks up ACH file identifier/description codes, and `clsPaymentBatchNumber` is a cached, read-only lookup matching a payment type/authorization type/banking network combination to its configured batch number and description. Both are documented alongside the other reference tables in [Code table lookups](code-table-lookups.md); this page covers only the transactional `OUTPUT_CONTROL` lifecycle.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-EFT-06 |
| **Trigger** | Output/batch process calls `clsOutputControl.NewOutputControl` when a new output artifact is generated, and updates the row once it has been printed/transmitted |
| **Inputs** | Output document code, claim/policy reference, payment/authorization/banking-network type codes |
| **Outputs** | Persisted/updated `OUTPUT_CONTROL` row; `PRINTED_DATE` populated once transmitted |
| **Primary components** | `clsOutputControl.BeforeCreate/Insert/Retrieve/Update/Delete`; `clsOutputControlCollection` |
| **Entry point** | `Business\SAIF.Business.Payment.EFT\clsOutputControl.vb` |

## Steps

1. **Create a new output-control record.** `clsOutputControl.NewOutputControl` fetches the next sequence value ([SQL-004](../sql/SQL-004-saif-business-payment-eft.md), [DUAL](../database-tables.md#dual)) and initializes the record representing one generated output artifact.
2. **Insert.** `BeforeInsert`/`AfterInsert` executes `INSERT INTO OUTPUT_CONTROL (...)` ([SQL-014](../sql/SQL-014-saif-business-payment-eft.md), [OUTPUT_CONTROL](../database-tables.md#output_control)).
   - On failure (`RowsAffected <> 1`): adds an `InsertError` message ([BR-EFT-05](../business-rules.md#br-eft-05-insertupdate-operations-require-exactly-one-affected-row)).
3. **Retrieve a single record.** `BeforeRetrieve`/`AfterRetrieve` selects the full row by output-control sequence number ([SQL-051](../sql/SQL-051-saif-business-payment-eft.md), [OUTPUT_CONTROL](../database-tables.md#output_control)).
4. **Track pending vs. completed output.** `clsOutputControlCollection` retrieves rows by print date; a row with `PRINTED_DATE IS NULL` represents output still pending print/transmission ([SQL-052](../sql/SQL-052-saif-business-payment-eft.md)).
5. **Mark output as printed/transmitted.** Once the artifact has been transmitted, `UPDATE OUTPUT_CONTROL SET PRINTED_DATE = ...` closes out the pending state ([SQL-082](../sql/SQL-082-saif-business-payment-eft.md)).
   - On failure (`RowsAffected <> 1`): adds an `UpdateError` message ([BR-EFT-05](../business-rules.md#br-eft-05-insertupdate-operations-require-exactly-one-affected-row)).
6. **Delete a record.** A physical delete is available for correcting an erroneously-created output-control record ([SQL-093](../sql/SQL-093-saif-business-payment-eft.md)).
7. **Look up the ACH file identifier/description code (reference data).** `clsAchFileID` retrieves a single code ([SQL-022](../sql/SQL-022-saif-business-payment-eft.md), [ACH_FILE_ID](../database-tables.md#ach_file_id)) or all codes as a collection ([SQL-023](../sql/SQL-023-saif-business-payment-eft.md)); it implements only retrieval — Insert/Update/Delete are not implemented, confirming this is reference data maintained outside the application rather than a per-file-generation-run record.*
8. **Look up the configured payment batch number (reference data).** `clsPaymentBatchNumber` retrieves the full `PAYMENT_BATCH_NUMBER` reference table once per application-domain lifetime into a static, shared collection cache, then looks up the row matching a given payment-type/authorization-type/banking-network combination in memory; like `clsAchFileID`, every CRUD SQL property throws `NotImplementedException` except retrieval.
   - Because the lookup collection is cached at the shared/static level, a configuration change to `PAYMENT_BATCH_NUMBER` made after the first lookup in a running process will not be picked up until the cache is cleared or the process restarts.*
9. **Look up the output document code (reference data).** `clsOutputDocumentCode` retrieves a single code or all codes as a collection ([SQL-053](../sql/SQL-053-saif-business-payment-eft.md), [SQL-054](../sql/SQL-054-saif-business-payment-eft.md), [OUTPUT_DOCUMENT_CODE](../database-tables.md#output_document_code)), describing the type of document represented by an `OUTPUT_CONTROL` row (see [Code table lookups](code-table-lookups.md)).

## Process flow

```mermaid
flowchart TD
	Start([Output artifact generated]) --> Create[NewOutputControl]
	Create --> Insert[INSERT OUTPUT_CONTROL]
	Insert --> Rows{RowsAffected = 1?}
	Rows -->|No| Err([InsertError added])
	Rows -->|Yes| Pending{Transmitted?}
	Pending -->|No| Queue([Remains in pending queue:<br>PRINTED_DATE IS NULL])
	Pending -->|Yes| Mark[UPDATE PRINTED_DATE]
	Mark --> Done([Output cycle complete])
```

## Failure and edge-case behavior

- `clsAchFileID` and `clsPaymentBatchNumber` are both read-only reference/code tables from the application's perspective — despite their names suggesting active file/batch generation, neither creates, updates, or deletes rows; only `clsOutputControl` performs real transactional writes for output tracking.*
- `clsPaymentBatchNumber`'s shared/static cache is populated once per process and never automatically refreshed — any mid-process change to the `PAYMENT_BATCH_NUMBER` reference table would not be visible until the cache is invalidated or the process restarts.*
- Output rows with `PRINTED_DATE IS NULL` represent the authoritative "still pending" queue; any process that bypasses updating this field after successful transmission would cause the same output to be reprocessed on the next run.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `Business\SAIF.Business.Payment.EFT\clsOutputControl.vb`
- `Business\SAIF.Business.Payment.EFT\clsOutputControlCollection.vb`
- `Business\SAIF.Business.Payment.EFT\clsAchFileID.vb`
- `Business\SAIF.Business.Payment.EFT\clsAchFileIDCollection.vb`
- `Business\SAIF.Business.Payment.EFT\clsPaymentBatchNumber.vb`
- `Business\SAIF.Business.Payment.EFT\clsOutputDocumentCode.vb`
- `Business\SAIF.Business.Payment.EFT\clsOutputDocumentCodeCollection.vb`
