Skip to content

BB607 OCL

The BB607.ocl36.txt is an OCL (Operation Control Language) program for the IBM System/36 environment, executed as part of the invoice posting workflow, likely called by the main OCL program (e.g., BB600.ocl36.txt). Its primary function is to prepare files for processing by clearing and reorganizing specific physical files related to shipment and customer data. The program does not directly execute an RPG program but sets up the environment for subsequent processing. Below is a detailed explanation of the process steps, business rules, tables used, and external programs called.


Process Steps of the BB607 OCL Program

The BB607 OCL program performs file management tasks to ensure that shipment and customer files are ready for processing by clearing and reorganizing them.

  1. File Allocation:
  2. Allocates four files with shared disposition (DISP-SHR) for read access:
    • VISSHCN: Shipment container file.
    • BBORDR: Order master file.
    • VISSHCH: Shipment header file.
    • ARCUFMX: Customer master file.
  3. The ?9? placeholder in the LABEL parameter indicates that the actual library or file label is resolved at runtime, typically by the System/36 environment or job setup.

  4. Clear Physical File (CLRPFM):

  5. Executes the CLRPFM command to clear the contents of the VISSHSM file:

    • File: VISSHSM (shipment summary file).
    • Action: Deletes all records in VISSHSM, resetting it to an empty state.
    • The ?9? prefix indicates the library is resolved at runtime.
  6. Reorganize Physical File (RGZPFM):

  7. Executes the RGZPFM command to reorganize the VISSHCN file:

    • File: VISSHCN (shipment container file).
    • Action: Reorganizes the file to optimize storage, remove deleted records, and rebuild indexes for efficient access.
    • The ?9? prefix indicates the library is resolved at runtime.
  8. Program Termination:

  9. The OCL program ends after executing the CLRPFM and RGZPFM commands, with no further processing or program calls.

Business Rules

  1. File Preparation:
  2. Ensures VISSHSM is cleared of all records to prepare for new shipment summary data.
  3. Reorganizes VISSHCN to maintain efficient access and storage for shipment container data.

  4. Shared File Access:

  5. Allocates VISSHCN, BBORDR, VISSHCH, and ARCUFMX with shared disposition (DISP-SHR), allowing concurrent read access by other programs or jobs.

  6. No Data Processing:

  7. The program does not process or manipulate data within the files; it only performs file maintenance tasks (CLRPFM, RGZPFM).

  8. Runtime Library Resolution:

  9. Uses ?9? placeholders for library names, indicating that the actual library is determined at runtime, likely based on job or system configuration.

  10. Integration with ARGLMS:

  11. Part of the invoice posting workflow, preparing shipment and customer files for subsequent processing by other programs in the ARGLMS system.

Tables (Files) Used

  1. VISSHCN:
  2. Description: Shipment container file.
  3. Purpose: Stores shipment container data (e.g., container details for orders).
  4. Usage: Allocated with DISP-SHR for read access and reorganized with RGZPFM to optimize storage and access.

  5. BBORDR:

  6. Description: Order master file.
  7. Purpose: Stores order master data (e.g., customer, ship-to, order details).
  8. Usage: Allocated with DISP-SHR for read access, likely used by subsequent programs.

  9. VISSHCH:

  10. Description: Shipment header file.
  11. Purpose: Stores shipment header data (e.g., shipment-level information).
  12. Usage: Allocated with DISP-SHR for read access, likely used by subsequent programs.

  13. ARCUFMX:

  14. Description: Customer master file.
  15. Purpose: Stores customer master data (e.g., customer details, billing information).
  16. Usage: Allocated with DISP-SHR for read access, likely used by subsequent programs.

  17. VISSHSM:

  18. Description: Shipment summary file.
  19. Purpose: Stores summary data for shipments.
  20. Usage: Cleared with CLRPFM to remove all records, preparing it for new data.

External Programs Called

The BB607 OCL program does not explicitly call any external programs. It performs file maintenance tasks (CLRPFM and RGZPFM) and sets up the environment for other programs in the invoice posting workflow (e.g., RPG programs like BB610 or BB620).


Summary

The BB607 OCL program, called by the main OCL (e.g., BB600.ocl36.txt), prepares shipment and customer files by: - Allocating VISSHCN, BBORDR, VISSHCH, and ARCUFMX with shared read access (DISP-SHR). - Clearing VISSHSM to remove all records (CLRPFM). - Reorganizing VISSHCN to optimize storage and access (RGZPFM). - Terminating after file maintenance.

Tables Used: VISSHCN (shipment container), BBORDR (order master), VISSHCH (shipment header), ARCUFMX (customer master), VISSHSM (shipment summary). External Programs Called: None.

This program ensures that shipment and customer files are properly initialized for subsequent processing in the ARGLMS invoice posting workflow.