Skip to content

BB622 RPG36

The BB622.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 CFIFILE to the output file CF0E020, effectively adding records to a file used for further processing in the Customer Freight Invoice (CFI) system. The program is straightforward, with minimal logic, and does not include any revisions or complex processing. Below is a detailed explanation of the process steps, business rules, tables used, and external programs called.


Process Steps of the BB622 RPG Program

The BB622 program reads records from CFIFILE and writes them to CF0E020 using the RPG cycle, with no transformations or validations.

  1. File Initialization:
  2. The program opens two files:
    • Input File:
    • CFIFILE: Primary input file (IP), 80 bytes per record, disk-based. Contains customer freight invoice records.
    • Output File:
    • CF0E020: Output file (O), 80 bytes per record, add capability (A), disk-based. Receives copied records.
  3. Defines a record format for CFIFILE:

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

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

  7. Output Processing:

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

  10. Cycle Completion:

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

Business Rules

  1. Direct Record Copy:
  2. Copies all records from CFIFILE to CF0E020 without modification.
  3. Assumes all records in CFIFILE 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 CF0E020 as-is.

  7. Integration with CFI System:

  8. Adds records to CF0E020, which is likely used in the Customer Freight Invoice system for further processing or reporting.

  9. No Error Handling:

  10. Assumes CFIFILE exists and contains valid data, and CF0E020 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.

Tables (Files) Used

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

  7. CF0E020:

  8. Description: Customer freight invoice output file.
  9. Attributes: 80 bytes per record, output file (O), add capability (A), disk-based.
  10. Fields Used:
    • RECORD (1–80): Entire record content.
  11. Purpose: Receives copied freight invoice records.
  12. Usage: Written with EADD RECADD.

External Programs Called

The BB622 RPG program does not call any external programs. It is a self-contained program that performs a simple copy operation from CFIFILE to CF0E020.


Summary

The BB622 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 CFIFILE (80 bytes) sequentially. - Writing each record to CF0E020 without modification using an exception output operation. - Terminating after processing all records.

Tables Used: CFIFILE (input freight invoice records), CF0E020 (output freight invoice records). External Programs Called: None.

This program supports the Customer Freight Invoice system by transferring records to a file for further processing, with minimal logic and no data transformation.