Skip to content

BI907C2 CLP

The BI907C2 CLP (Control Language Program) is a simple program within the Bradford Order Entry/Invoices system, called from the main RPGLE program BI907P. Its primary function is to clear a temporary work file used by other programs in the system. Below is a detailed explanation of the process steps, business rules, tables used, and external programs called.


Process Steps of the BI907C2 CLP Program

The BI907C2 program is straightforward and performs a single operation:

  1. Clear Work File:
  2. Executes the CLRPFM (Clear Physical File Member) command to clear all records from the BI907W file in the QTEMP library.
  3. The QTEMP library is a job-specific temporary library, ensuring that the file is unique to the current job and does not affect other users or jobs.

  4. Program Termination:

  5. The program ends with the ENDPGM command, returning control to the calling program (e.g., BI907P).

Business Rules

The BI907C2 program enforces the following business rules:

  1. Temporary File Management:
  2. The program ensures that the BI907W file in QTEMP is cleared of all records before it is used by other programs in the system.
  3. This prevents residual data from previous operations from affecting subsequent processes, ensuring a clean slate for temporary data storage.

  4. No Error Handling:

  5. The program does not include explicit error handling (e.g., MONMSG for CPF3142 if the file does not exist).
  6. It assumes that the BI907W file exists in QTEMP, as it is likely created by another program (e.g., BI907C) before BI907C2 is called.
  7. If the file does not exist, the CLRPFM command will fail, and the error will propagate to the calling program unless handled elsewhere.

  8. Context Dependency:

  9. The program is designed to be called as part of a larger workflow, likely from BI907P, to prepare the BI907W file for use in customer/ship-to file maintenance or inquiry processes.
  10. It does not accept parameters, implying that it operates on a predefined file (BI907W in QTEMP).

Tables Used

The BI907C2 program interacts with the following table: 1. BI907W: - Library: QTEMP. - Purpose: Temporary work file used for processing customer/ship-to data in the Bradford Order Entry/Invoices system. - Operation: Cleared using the CLRPFM command to remove all records. - Access: Write (implicitly via CLRPFM).

No other database files are directly referenced in BI907C2.


External Programs Called

The BI907C2 program does not call any external programs. It executes a single system command (CLRPFM) and terminates.


Summary

The BI907C2 CLP program is a minimal utility designed to clear the BI907W temporary work file in the QTEMP library. It ensures that no residual data remains in the file before it is used by other programs (e.g., BI907 or BI9078) in the customer/ship-to file maintenance or inquiry process. The program enforces a simple business rule of maintaining a clean temporary file but lacks explicit error handling, relying on the calling program or prior setup (e.g., by BI907C) to ensure the file exists. It interacts solely with the BI907W file and does not call any external programs, making it a lightweight component of the broader system workflow.