AR290A OCL
The provided document is an OCL (Operation Control Language) program, specifically AR290A.ocl36.txt, used in IBM System/36 environments to manage Accounts Receivable (A/R) salesman change transactions. Below, I’ll explain the process steps of the program, identify any external programs called, and list the tables/files used.
Process Steps of the RPG .OCL Program¶
The OCL program controls the flow of processing A/R salesman change transactions, handling validation, user interaction, and file operations. Here’s a step-by-step explanation of the program’s logic:
- Initial Program Identification and Setup:
- The program starts with metadata or comments identifying it as the "A/R SALESMAN CHANGE TRANSACTION POST" process (
// * 'A/R SALESMAN CHANGE TRANSACTION POST'). -
It likely runs under a specific procedure (
SCPROCP) and system context (GSY2K). -
Check for Changes in ARSLST File:
- The program checks the
ARSLSTfile to determine if there are any salesman change transactions to process (IFF DATAF1-?9?ARSLST). - Case 1: No Changes Exist:
- If no changes are found (
* 'NO CHANGES EXIST TO BE PROCESSED'), the program: - Checks if the change table (
ARSLST) has no records (IF ?F'A,?9?ARSLST'?/0000000 * 'NO RECORDS EXIST IN THE CHANGE TABLE'). - Displays a message indicating the posting process is canceled (
* 'THE POSTING PROCESS HAS BEEN CANCELLED'). - Prompts the user to press
0, ENTERto continue (PAUSE 'TO CONTINUE--PRESS 0, ENTER'). - Terminates the program (
CANCEL).
- If no changes are found (
-
Case 2: Changes Exist:
- If changes are found (
* 'THERE ARE CHANGES TO PROCESS'), the program: - Prompts the user with options to either cancel (press
SHIFT + ATTN, 2, ENTER) or continue (press0, ENTER) (PAUSE 'TO CANCEL--PRESS SHIFT + ATTN,2,ENTER TO CONTINUE--PRESS 0,ENTER').
- If changes are found (
-
Processing Changes:
- If changes exist and the user chooses to continue, the program checks for the existence of the
SLSCHGfile (IFF DATAF1-?9?SLSCHG). - It then builds or processes the
SLSCHGfile (BLDFILE ?9?SLSCHG,S,RECORDS,1,32,,T,,,NDFILE):BLDFILEis an OCL command to create or manipulate a file.- Parameters suggest it processes records in the
SLSCHGfile, starting at record 1, with a block size or increment of 32, and other attributes (e.g.,Tfor temporary file,NDFILEfor no direct file).
- If the
SLSCHGfile is successfully processed, it displays a message:* 'THE POSTING PROCESS HAS BEEN ACTIVATED'. -
If the
SLSCHGfile processing is canceled or fails, it displays:* 'THE POSTING PROCESS HAS BEEN CANCELLED', followed by a pause for user acknowledgment (PAUSE 'TO CONTINUE--PRESS 0,ENTER'). -
User Interaction and Cancellation:
- Throughout the process, the program uses
PAUSEcommands to interact with the user, allowing them to confirm continuation or cancel the process. - Cancellation can occur at multiple points, either explicitly by the user (via
SHIFT + ATTN, 2, ENTER) or implicitly if no records/changes are found.
External Programs Called¶
The OCL program itself does not explicitly call external RPG programs in the provided code. The BLDFILE command suggests file manipulation, which may involve system utilities or underlying RPG programs, but no specific program names are mentioned. Typically, in System/36 environments, BLDFILE is a system command that may invoke internal system routines rather than user-defined RPG programs. Therefore, based on the provided code:
- External Programs: None explicitly called.
Tables/Files Used¶
The program interacts with the following files/tables:
- ARSLST:
- Description: Likely the A/R Salesman List or change table, which stores pending salesman change transactions.
-
Role: The program checks this file to determine if changes exist (
DATAF1-?9?ARSLST) and verifies if it contains records (?F'A,?9?ARSLST'?/0000000). -
SLSCHG:
- Description: A file used to process or store salesman change transactions, possibly a temporary or working file.
- Role: The program builds or processes this file (
BLDFILE ?9?SLSCHG) if changes are present inARSLST.
Summary¶
- Process Overview: The program checks for salesman change transactions in the
ARSLSTfile. If no changes exist, it informs the user and cancels. If changes are found, it prompts the user to continue or cancel. On continuation, it processes the changes via theSLSCHGfile, activating or canceling the posting process based on the outcome. - External Programs: None explicitly called.
- Tables/Files:
ARSLST(salesman change table),SLSCHG(processed change file).
If you need further clarification or analysis (e.g., specific RPG program interactions or additional context), please let me know!