BI920 OCL
The provided OCL (Operation Control Language) script is a procedure used on IBM midrange systems (such as AS/400 or IBM i) to prepare and execute an RPG (Report Program Generator) program named BI920, which appears to handle maintenance for a product tax master file. OCL is not the RPG program itself but a control language that sets up the environment, loads the program, defines required files, and initiates execution. Below, I'll explain the process steps based on the script, followed by the requested lists .
Process Steps¶
The OCL script follows a sequential setup and execution flow typical for running batch or interactive RPG programs on IBM systems. Here's a step-by-step breakdown:
-
Procedure Initialization: The script begins with
// SCPROCP ,,,,,,,,?9?
, which likely initializes a procedure or sets parameters for the job.SCPROCP
may be a custom or system command for procedure control, and the commas with?9?
act as placeholders or parameter substitutes (common in OCL for dynamic values like library names or job parameters). -
Library or Environment Setup: The
// GSY2K
command loads or references a library or module named GSY2K. This could be related to Y2K compliance utilities (given the name), a global system setup, or a specific library containing shared routines or data definitions needed for the program. -
Program Loading: The
// LOAD BI920
command loads the compiled RPG program BI920 into memory. This prepares the executable code for running but does not yet execute it. BI920 is the core program responsible for the "PRODUCT TAX MASTER FILE MAINTENANCE" functionality, likely involving CRUD (Create, Read, Update, Delete) operations on tax-related product data. -
File Definitions: A series of
// FILE
commands define the physical or logical files (akin to database tables or datasets) that the RPG program will access. Each file is specified with: NAME
: The logical name used by the program.LABEL
: A reference to the actual file label or dataset name (e.g.,?9?BIPRTX
uses?9?
as a parameter substitute for a prefix like a library or volume).DISP-SHR
: Sets the disposition to shared access, allowing concurrent read/write by other jobs without exclusive locks.
The files defined are: - BIPRTX (likely the primary product tax master file). - GSTABL (possibly a general system table for lookups or configurations). - GSPROD (likely a product master file). - BICONT (possibly a control file for batch or system constants). - BISLTX (likely a sales tax or related tax configuration file).
These definitions ensure the program can open and interact with the necessary data sources during execution.
-
Program Execution: The
// RUN
command initiates the execution of the loaded BI920 program. At this point, the RPG logic takes over, using the defined files to perform maintenance tasks (e.g., updating tax rates, adding/removing products, or validating data). The program would terminate upon completion, potentially producing output like reports or updated files. -
Job Termination: The script ends implicitly after
// RUN
, with the job concluding once BI920 finishes. Any errors (e.g., file not found) would be handled by the system's job control.
This OCL acts as a wrapper to automate the setup for BI920, ensuring consistent execution in a batch or scheduled environment. The actual business logic (e.g., calculations, validations) resides in the RPG source code of BI920, which is not provided here.
External Programs Called¶
Based on the OCL script, no external programs are explicitly called. The script only loads and runs BI920 itself. Any subroutines or external calls would be defined within the RPG code of BI920 (e.g., via CALL opcodes), but those details are not available in this document.
Tables Used¶
The script references the following files, which function as tables or datasets in the IBM environment: - BIPRTX (product tax master file). - GSTABL (general system table). - GSPROD (product master file). - BICONT (control file). - BISLTX (sales tax file).