GS800 OCL
The provided document is an OCL (Operation Control Language) program, specifically for IBM System/36 or AS/400 systems, used to manage and execute tasks in a legacy computing environment. The program appears to be named GS800 and is related to a TABLE FILE INQUIRY process. Below, I’ll explain the process steps, identify any external programs called, and list the tables (files) used, based on the OCL code provided.
Process Steps of the GS800 OCL Program¶
OCL programs on the System/36 are typically used to define job execution parameters, load files, and invoke programs or procedures. The steps in this OCL program can be broken down as follows:
- Header and Comments:
-
The lines starting with
**
are comments, providing metadata or descriptions:TABLE FILE INQUIRY
: Indicates the program is related to querying or processing table files.// SCPROCP ,,,,,,,,?9?
: Likely a procedure name or identifier with a placeholder (?9?
), possibly for a specific version or parameter.// GSY2K
: Could be a reference to a system identifier, program version, or compliance marker (e.g., Y2K compliance).
-
File Loading (LOAD Statement):
-
The
// LOAD GS800
statement loads the GS800 program or module into memory for execution. This indicates that GS800 is the primary program or procedure being executed. -
File Definitions:
- The
// FILE
statements define the input files (tables) to be used by the program. Each file is specified with a name, label, and disposition:NAME-GSTABL, LABEL-?9?GSTABL, DISP-SHR
: Loads a file named GSTABL with a label that includes a placeholder (?9?GSTABL
).DISP-SHR
indicates the file is opened in shared mode, allowing multiple processes to access it concurrently.NAME-GSTABLX, LABEL-?9?GSTABL, DISP-SHR
: Loads a file named GSTABLX, also with a shared disposition and the same label pattern.NAME-GSTABLY, LABEL-?9?GSTABL, DISP-SHR
: Loads a file named GSTABLY, following the same pattern.NAME-GSTABLZ, LABEL-?9?GSTABL, DISP-SHR
: Loads a file named GSTABLZ, following the same pattern.NAME-GSPROD, LABEL-?9?GSPROD, DISP-SHR
: Loads a file named GSPROD with a label?9?GSPROD
.NAME-GSCNTR, LABEL-?9?GSCNTR, DISP-SHR
: Loads a file named GSCNTR with a label?9?GSCNTR
.
-
The
?9?
in the labels likely represents a dynamic parameter or version number, possibly passed at runtime or defined in a calling procedure. -
Program Execution (RUN Statement):
- The
// RUN
statement initiates the execution of the loaded GS800 program. No additional parameters are specified, suggesting that the program uses the loaded files and any default or embedded logic to perform its tasks.
External Programs Called¶
- The OCL code does not explicitly call any external programs beyond loading and running GS800. There are no references to other procedures or programs (e.g., via
// CALL
or similar statements). Therefore, no external programs are explicitly called in this OCL script.
Tables (Files) Used¶
The OCL program references the following files (tables): 1. GSTABL: A table file, likely the primary data file, opened in shared mode. 2. GSTABLX: A related table file, possibly an index or extension of GSTABL. 3. GSTABLY: Another related table file, possibly another index or subset. 4. GSTABLZ: Another related table file, possibly another index or subset. 5. GSPROD: A table file, likely containing production-related data. 6. GSCNTR: A table file, possibly a control or counter file used for tracking or configuration.
Additional Notes¶
- Purpose: The program appears to be designed for querying or processing data stored in the specified table files (GSTABL, GSTABLX, GSTABLY, GSTABLZ, GSPROD, GSCNTR). The exact logic (e.g., RPG code) is not provided, but it likely involves reading, updating, or reporting data from these files.
- Placeholder (
?9?
): The?9?
in labels suggests a parameterized or dynamic file naming convention, possibly resolved at runtime by a calling procedure or system configuration. - Shared Disposition: The
DISP-SHR
indicates the files can be accessed by multiple jobs simultaneously, typical for inquiry or reporting programs that don’t modify data. - RPG Context: Since the query mentions an RPG .OCL program, GS800 is likely an RPG (Report Program Generator) program on the System/36, which uses OCL to set up the environment and load files before executing RPG logic for data processing.
Summary¶
- Process Steps:
- Load the GS800 program.
- Define and open six table files (GSTABL, GSTABLX, GSTABLY, GSTABLZ, GSPROD, GSCNTR) in shared mode.
- Execute the GS800 program.
- External Programs Called: None explicitly called.
- Tables Used: GSTABL, GSTABLX, GSTABLY, GSTABLZ, GSPROD, GSCNTR.
If you have additional details, such as the RPG source code for GS800 or more context about the system, I can provide a more detailed explanation of the program’s logic or behavior. Let me know if you need further assistance!