BI921P OCL
The provided document is an Operation Control Language (OCL) program, specifically BI921P.ocl36.txt
, used in IBM System/36 or AS/400 environments to control job execution and data processing. OCL is a scripting language for managing job flows, file operations, and program execution on these systems. Below, I’ll explain the process steps of the OCL program, identify any external programs called, and list the tables or files used.
Process Steps of the OCL Program¶
The OCL program BI921P
appears to manage a job related to a "Product Tax Master List." Here’s a step-by-step breakdown of the process based on the provided code:
- Header and Metadata:
- The file starts with a comment:
** PRODUCT TAX MASTER LIST **
, indicating the purpose of the program, likely related to managing or processing a product tax master list. -
The next comment,
// SCPROCP ,,,,,,,,?9?
, suggests a reference to a procedure or job step with a placeholder?9?
, which is likely a parameter or variable replaced at runtime (e.g., a job number, library, or specific identifier). -
Initialize Environment:
-
// LOCAL BLANK-*ALL
: This command clears all local variables or sets them to blank, ensuring a clean environment for the job execution. It prevents residual data from previous runs from affecting the current job. -
System Compliance Check:
-
// GSY2K
: This likely refers to a system check or configuration for Year 2000 (Y2K) compliance, ensuring date-related processing is handled correctly. It may invoke a system-level routine or set a flag for date formatting. -
Load Program:
-
// LOAD BI921P
: This command loads theBI921P
program into memory for execution. The program name suggests it’s the main RPG (Report Program Generator) program responsible for the core logic of processing the product tax master list. -
File Specification:
-
// FILE NAME-BICONT,LABEL-?9?BICONT,DISP-SHR
:- Specifies a file named
BICONT
to be used by the program. LABEL-?9?BICONT
indicates the file’s label, where?9?
is a placeholder for a dynamic value (e.g., a library or prefix).DISP-SHR
(Disposition: Shared) means the file is opened in shared mode, allowing multiple jobs or processes to access it concurrently without exclusive locking.
- Specifies a file named
-
Run the Program:
-
// RUN
: Executes the loadedBI921P
program. This is where the RPG program’s logic (not shown in the OCL) processes the data, likely generating or updating the product tax master list. -
Conditional Job Control:
// IF ?L'129,6'?/CANCEL GOTO END
:- Checks a condition based on a local variable or system parameter at position 129, character 6 (likely a status code or flag).
- If the condition evaluates to
CANCEL
, the job branches to theEND
tag, terminating the job. - This acts as a safety check to abort the job if a specific error or condition is met.
// IF ?L'120,1'?/Y JOBQ ?CLIB?,BI921,,,,,,,,,?9?
:- Checks another condition at position 120, character 1, for a value of
Y
. - If true, the job is submitted to a job queue (
JOBQ
) in the library specified by?CLIB?
, running the programBI921
with parameters (including?9?
as a placeholder). - This suggests the job can be queued for asynchronous execution under certain conditions.
- Checks another condition at position 120, character 1, for a value of
-
// ELSE BI921 ,,,,,,,,?9?
:- If the condition at position 120,1 is not
Y
, theBI921
program is executed directly (synchronously) with the?9?
parameter. - The commas indicate placeholders for additional parameters that may be optional or defaulted.
- If the condition at position 120,1 is not
-
End of Job:
// TAG END
: Marks theEND
label, where the job jumps if theCANCEL
condition is met.// LOCAL BLANK-*ALL
: Clears local variables again, ensuring no residual data remains after job completion.
External Programs Called¶
The OCL program explicitly references the following external program:
- BI921: This is the main RPG program executed or queued by the OCL script. It’s loaded via // LOAD BI921P
and referenced in the conditional job queue (JOBQ ?CLIB?,BI921
) or direct execution (BI921 ,,,,,,,,?9?
).
No other external programs are explicitly mentioned in the OCL code.
Tables/Files Used¶
The OCL program references the following file:
- BICONT: Specified in // FILE NAME-BICONT,LABEL-?9?BICONT,DISP-SHR
. This is likely a data file (table) containing product tax information or related data processed by the BI921
program. The ?9?
in the label suggests a dynamic prefix or library name.
No additional files or tables are explicitly mentioned in the OCL code. However, the RPG program BI921
may reference additional files or tables internally, which are not visible in the OCL script.
Summary¶
- Process Steps: The OCL program initializes the environment, checks for Y2K compliance, loads the
BI921P
program, specifies theBICONT
file, runs the program, and uses conditional logic to either queue or executeBI921
based on system parameters. It includes error checking to cancel the job if needed and cleans up variables at the end. - External Programs Called:
BI921
(RPG program). - Tables/Files Used:
BICONT
(data file with a dynamic label).
If you have the RPG source code for BI921
or additional context about the system (e.g., parameter values for ?9?
or ?CLIB?
), I can provide a more detailed analysis of the program’s logic or file interactions. Let me know if you’d like me to search for related information or analyze further!