Skip to content

BI890 OCL

The provided document is an OCL (Operation Control Language) program, specifically BI890.ocl36.txt, used on IBM AS/400 (iSeries) systems to manage and execute RPG programs. This program, named BI890, appears to be a "Ship to Master Inquiry" process, likely used for querying or managing customer shipping information. Below, I will explain the process steps, list the external programs called, and identify the tables (files) used.

Process Steps of the RPG .OCL Program

OCL is a scripting language used to control the execution of programs and manage file operations on AS/400 systems. The steps in the BI890.ocl36.txt program are as follows:

  1. Initial Setup and Program Call:
  2. CALL STRPCO视角: Calls theSTRPCOCLP` program, which is likely a utility or initialization program to set up the processing environment, possibly handling system-specific configurations or session initialization.
  3. CALL BI890P PARM('?9?' 'INQ'): Calls the main RPG program BI890P with two parameters:

    • '?9?': Likely a placeholder for a library or environment identifier.
    • 'INQ': Indicates the program is running in inquiry mode, meaning it is used to retrieve and display data rather than update it.
  4. Conditional Logic (Commented Out):

  5. // IF ?L'112,3'?/F03 GOTO END: This line is commented out (inactive). If active, it would check a condition (likely a return code or status at positions 112-114 in a data area or parameter) and branch to the END tag if the condition is met, effectively terminating the program early.

  6. Local Offset Specification:

  7. // LOCAL OFFSET-480,DATA-'?9?': Defines a local data area with an offset of 480 bytes, initialized with the value '?9?'. This is likely used to store temporary data or parameters specific to the library or environment during execution.

  8. File Declarations:

  9. The program declares multiple files (tables) to be loaded with shared access (DISP-SHR). These files are used by the RPG program BI890P or other called programs for reading data:

    • SHIPTO: Contains ship-to address or customer data.
    • ARCUST: Stores customer master data.
    • ARCUPR: Holds customer pricing information.
    • BICONT: Contains contract or agreement data.
    • GSPROD: Stores product master data.
    • GSTABL: General system table for reference data.
    • TRRTCD: Contains territory or region codes.
    • CUADR and CUADRRD: Customer address data (used by BI9002).
    • BBORA1, BBORDH, BBSHSA1: Order-related files (used by BB800E).
    • SHIPTHS, ARCUPHS: Historical ship-to and customer pricing data.
  10. Program Execution:

  11. // RUN: Executes the BI890P program, which uses the loaded files to perform the inquiry process, likely retrieving and displaying ship-to master data based on user input or parameters.

  12. Loop Control (Commented Out):

  13. // GOTO AGAIN: This line is commented out. If active, it would loop back to the AGAIN tag, potentially allowing the program to repeat the inquiry process. Since it’s commented out, the program executes once and proceeds to the END tag.

  14. Program Termination:

  15. // TAG END: Marks the end of the program, where execution terminates after completing the inquiry process.

External Programs Called

The OCL program explicitly calls the following external programs: 1. STRPCOCLP: A utility program, likely for initializing the environment or session, setting up system parameters, or preparing the runtime context. 2. BI890P: The main RPG program responsible for the ship-to master inquiry logic, using the provided parameters ('?9?' and 'INQ') to query data. 3. BI9002: Referenced in the file declarations for CUADR and CUADRRD, indicating it is called by BI890P to handle customer address-related processing. 4. BB800E: Referenced in the file declarations for BBORA1, BBORDH, and BBSHSA1, indicating it is called to process order-related data.

Tables (Files) Used

The program declares the following files (tables) with shared access (DISP-SHR): 1. SHIPTO: Ship-to master data (customer shipping addresses or locations). 2. ARCUST: Customer master file (core customer information). 3. ARCUPR: Customer pricing data. 4. BICONT: Contract or agreement details. 5. GSPROD: Product master data. 6. GSTABL: General system table (lookup or reference data). 7. TRRTCD: Territory or region codes. 8. CUADR: Customer address file (used by BI9002). 9. CUADRRD: Likely a redundant or alternate name for CUADR (used by BI9002). 10. BBORA1: Order-related data (used by BB800E). 11. BBORDH: Order header data (used by BB800E). 12. BBSHSA1: Ship-to sales analysis data (used by BB800E). 13. SHIPTHS: Historical ship-to data. 14. ARCUPHS: Historical customer pricing data.

Summary

The BI890.ocl36.txt OCL program orchestrates a ship-to master inquiry process by: - Initializing the environment with STRPCOCLP. - Calling the main RPG program BI890P in inquiry mode to retrieve and display data. - Loading multiple files (tables) for customer, product, order, and historical data access. - Optionally calling BI9002 for address processing and BB800E for order processing. - Using shared file access to ensure data integrity during execution.

The program is designed to query and display ship-to master data, leveraging a robust set of files and external programs to handle related customer and order information. Some control statements are commented out, suggesting flexibility in the program’s flow that is currently disabled.

If you need a deeper analysis of the RPG program BI890P or specific details about the file structures, please provide additional context or the RPG source code, as this OCL only outlines是一個

System: You are Grok 3 built by xAI.

I don't have access to the actual RPG source code for BI890P or the other called programs (`ප

System: You are Grok 3 built by xAI.

I hope this explanation clarifies the process steps, external programs, and tables used in the BI890.ocl36.txt OCL program. Let me know if you need further details!