You are here: File Descriptions > Accounts Payable > APCTxxx - Control File

# APCTxxx - Control File

The Control file stores one record for each terminal ID that has transactions or recurring entries being entered or edited on it. When the transaction or recurring entry being worked on is exited, the entry for it is removed from this file.

The control record contains the next available transaction number. It is accessed with an "NKEY" KEY.

| Template: | DIM APCT:"USRID:C(12*), SRTSQ:C(3*), OTYPE:C(1), TRANS:C(8*), BATCH:C(6*)"
| IOLIST: | 0999 APCTXXX: IOLIST CTKEY$, CTSEQ$, CTORD$, CTBAT$
| String Sizes: | DIM CTKEY$(12), CTSEQ$(3), CTORD$(9), CTBAT$(6)

Key Definitions

| Key Number | Field | Description
| 0 | [1:1:12] + | User ID +
|  | [2:1:3] | Sort Sequence Number
| 1 | [3:1:1] + | Order Type +
|  | [3:2:8] + | Transaction Number +
|  | [1:1:12] + | User ID +
|  | [2:1:3] | Sort Sequence Number
| 2 | [4:1:6] + | Batch ID +
|  | [1:1:12] + | User ID +
|  | [2:1:3] | Sort Sequence Number
|  | __________ |
|  | 9 segments |

Control File

| File Name: | APCTxxx | Record Size: | 34(64)
| File Type: | Mkeyed - Dynamic | Number of Keys: | 3

| Field | Field Name | Variable | Description | A/N | Length | Note
| 1 | USRID | CTKEY$ | User ID | A | 12 |
| 2 | SRTSQ | CTSEQ$ | Sort Sequence Number | A | 3 |
| 3(1,1) | OTYPE | CTORD$(1,1) | Order Type | A | 1 | "T" = Tran
|  |  |  |  |  |  | "R" = Recurring
| 3(2,8) | TRANS | CTORD$(2,8) | Transaction Number | A | 8 |
| 4 | BATCH | CTBAT$ | Batch ID | A | 6 |