Skip to content

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.

  1. File Initialization:
  2. 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.
  3. Defines a record format for ARTLTR:

    • RECORD: Single field (positions 1–211) containing the entire record.
  4. Record Processing:

  5. Reads each record from ARTLTR sequentially using the RPG cycle (NS 01).
  6. For each record, executes an exception output operation (EXCPTRECADD) to write to APTORC.

  7. Output Processing:

  8. Writes the entire RECORD field (211 bytes) to APTORC using the EADD RECADD specification.
  9. No modifications or validations are performed on the record data.

  10. Cycle Completion:

  11. Processes all records in ARTLTR until the end of the file.
  12. Closes all files and terminates.

Business Rules

  1. Direct Record Copy:
  2. Copies all records from ARTLTR to APTORC without modification.
  3. Assumes all records in ARTLTR are valid and suitable for output.

  4. No Validation or Filtering:

  5. Does not check record content, transaction types, or dates.
  6. All records are written to APTORC as-is.

  7. Integration with CFI System:

  8. Adds records to APTORC, which is likely used in the Customer Freight Invoice system or accounts payable processing for freight-related transactions.

  9. No Error Handling:

  10. Assumes ARTLTR exists and contains valid data, and APTORC can be written to without issues.
  11. No explicit error handling for file access or write failures.

  12. Simple Workflow:

  13. Designed as a straightforward data transfer program within the invoice posting workflow, similar to BB622.

Tables (Files) Used

  1. ARTLTR:
  2. Description: Accounts payable or freight transaction input file.
  3. Attributes: 211 bytes per record, primary input file (IP), disk-based.
  4. Fields Used:
    • RECORD (1–211): Entire record content.
  5. Purpose: Contains transaction records to be copied.
  6. Usage: Read sequentially to process records.

  7. APTORC:

  8. Description: Accounts payable or freight transaction output file.
  9. Attributes: 211 bytes per record, output file (O), add capability (A), disk-based.
  10. Fields Used:
    • RECORD (1–211): Entire record content.
  11. Purpose: Receives copied transaction records.
  12. 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.