BB623 RPG36
The BB623.rpg36.txt RPG program is a simple program called by the main OCL program (likely BB600.ocl36.txt) within the invoice posting workflow on an IBM System/36 environment. Its primary function is to copy records from the input file ARTLTR to the output file APTORC, effectively adding records to a file used for accounts payable or freight-related processing in the Customer Freight Invoice (CFI) system. Similar to BB622.rpg36.txt, this program is straightforward, with minimal logic and no data transformation. Below is a detailed explanation of the process steps, business rules, tables used, and external programs called.
Process Steps of the BB623 RPG Program¶
The BB623 program reads records from ARTLTR and writes them to APTORC using the RPG cycle, with no modifications or validations.
- File Initialization:
- The program opens two files:
- Input File:
ARTLTR: Primary input file (IP), 211 bytes per record, disk-based. Contains accounts payable or freight-related transaction records.- Output File:
APTORC: Output file (O), 211 bytes per record, add capability (A), disk-based. Receives copied records.
-
Defines a record format for
ARTLTR:RECORD: Single field (positions 1–211) containing the entire record.
-
Record Processing:
- Reads each record from
ARTLTRsequentially using the RPG cycle (NS 01). -
For each record, executes an exception output operation (
EXCPTRECADD) to write toAPTORC. -
Output Processing:
- Writes the entire
RECORDfield (211 bytes) toAPTORCusing theEADD RECADDspecification. -
No modifications or validations are performed on the record data.
-
Cycle Completion:
- Processes all records in
ARTLTRuntil the end of the file. - Closes all files and terminates.
Business Rules¶
- Direct Record Copy:
- Copies all records from
ARTLTRtoAPTORCwithout modification. -
Assumes all records in
ARTLTRare valid and suitable for output. -
No Validation or Filtering:
- Does not check record content, transaction types, or dates.
-
All records are written to
APTORCas-is. -
Integration with CFI System:
-
Adds records to
APTORC, which is likely used in the Customer Freight Invoice system or accounts payable processing for freight-related transactions. -
No Error Handling:
- Assumes
ARTLTRexists and contains valid data, andAPTORCcan be written to without issues. -
No explicit error handling for file access or write failures.
-
Simple Workflow:
- Designed as a straightforward data transfer program within the invoice posting workflow, similar to
BB622.
Tables (Files) Used¶
- ARTLTR:
- Description: Accounts payable or freight transaction input file.
- Attributes: 211 bytes per record, primary input file (
IP), disk-based. - Fields Used:
RECORD(1–211): Entire record content.
- Purpose: Contains transaction records to be copied.
-
Usage: Read sequentially to process records.
-
APTORC:
- Description: Accounts payable or freight transaction output file.
- Attributes: 211 bytes per record, output file (
O), add capability (A), disk-based. - Fields Used:
RECORD(1–211): Entire record content.
- Purpose: Receives copied transaction records.
- Usage: Written with
EADD RECADD.
External Programs Called¶
The BB623 RPG program does not call any external programs. It is a self-contained program that performs a simple copy operation from ARTLTR to APTORC.
Summary¶
The BB623 RPG program, called by the main OCL (e.g., BB600.ocl36.txt), performs a basic task in the invoice posting workflow by:
- Reading records from ARTLTR (211 bytes) sequentially.
- Writing each record to APTORC without modification using an exception output operation.
- Terminating after processing all records.
Tables Used: ARTLTR (input transaction records), APTORC (output transaction records).
External Programs Called: None.
This program supports the Customer Freight Invoice or accounts payable system by transferring records to a file for further processing, with minimal logic and no data transformation, mirroring the simplicity of BB622.