AR137A OCL
The provided document is an OCL (Operation Control Language) script named AR137A.ocl36, which is called by the main AR156.ocl36 script. This script is responsible for creating a bank upload table for EFT (Electronic Funds Transfer) processing and generating a report for EFT transactions for each customer. Below is a detailed explanation of the process steps, business rules, tables used, and external programs called.
Process Steps of the AR137A.ocl36 Program¶
- Clear the AREFTS File:
- The script begins with the
CLRPFMcommand to clear the file?9?AREFTS. ?9?is a placeholder for a dynamically assigned library prefix (set earlier in the mainAR156.ocl36script, likely via theLOCAL OFFSET-501,DATA-'?9?'command).-
This step ensures that the
AREFTSfile, which serves as a staging file for EFT data, is empty before new data is written to it. -
Load and Run AR137A Program:
- The script loads the program
AR137A(likely an RPG or similar program designed for EFT processing). - The following files are opened in shared mode (
DISP-SHR):AREFTDwith label?9?E?L'110,6'?: An input file containing EFT data, where?L'110,6'?likely represents a date or batch identifier (from position 110, length 6, as set inAR156P).AREFTDwith label?9?AREFTX: Another EFT data file, possibly an alternate or temporary file used for processing.AREFTSwith label?9?AREFTS: The output staging file for EFT data, which was cleared in the previous step.ARCONTwith label?9?ARCONT: A control or configuration file, likely containing company or system settings.ARCUSTwith label?9?ARCUST: A customer master file, containing customer details relevant to EFT processing.
- The
RUNcommand executes theAR137Aprogram, which processes the input EFT data (AREFTD), retrieves necessary information fromARCONTandARCUST, and populates theAREFTSfile with processed EFT data. Additionally, it generates a report detailing EFT transactions for each EFT customer.
Business Rules¶
- Clear Output File Before Processing:
- The
AREFTSfile must be cleared before processing to ensure no residual data from previous runs affects the current EFT data generation. -
This ensures data integrity and prevents duplicate or incorrect transactions in the output.
-
Shared File Access:
-
All files (
AREFTD,AREFTS,ARCONT,ARCUST) are opened in shared mode (DISP-SHR), allowing concurrent access by other processes or programs, which is critical in a multi-user environment. -
EFT Data Processing:
- The
AR137Aprogram processes EFT data from the input fileAREFTD(labeled?9?E?L'110,6'?or?9?AREFTX) to create a bank upload table inAREFTS. -
It uses customer data from
ARCUSTand configuration data fromARCONTto ensure accurate EFT transaction details. -
Report Generation:
-
The program generates an EFT report listing transactions for each EFT customer, providing a record of the funds transfer details for auditing or verification purposes.
-
Dynamic File Naming:
- The use of
?9?as a library prefix and?L'110,6'?as a dynamic label indicates that the script is designed to work with dynamically assigned libraries and date-specific files, ensuring flexibility across different environments or batch dates.
Tables (Files) Used¶
- AREFTD (
?9?E?L'110,6'?,?9?AREFTX): - Input file(s) containing EFT data to be processed.
- Two labels are specified, suggesting either multiple sources or alternate files for EFT data (e.g.,
?9?AREFTXmight be a temporary or alternate dataset). -
Opened in shared mode (
DISP-SHR). -
AREFTS (
?9?AREFTS): - Output staging file for processed EFT data, cleared at the start of the script.
- Used to store the bank upload table created by the
AR137Aprogram. -
Opened in shared mode (
DISP-SHR). -
ARCONT (
?9?ARCONT): - Control or configuration file, likely containing company or system-level settings for EFT processing.
-
Opened in shared mode (
DISP-SHR). -
ARCUST (
?9?ARCUST): - Customer master file, containing customer details such as account numbers or EFT preferences.
- Opened in shared mode (
DISP-SHR).
External Programs Called¶
- AR137A:
- The main program loaded and executed by the script.
- Responsible for processing EFT data from
AREFTD, usingARCONTandARCUSTfor reference, populatingAREFTS, and generating an EFT report for each customer.
Summary¶
The AR137A.ocl36 script is a component of the EFT process that prepares a bank upload table and generates a report for EFT transactions. It starts by clearing the AREFTS staging file to ensure a clean slate, then loads and runs the AR137A program, which processes EFT data from AREFTD, references ARCONT and ARCUST, and writes the results to AREFTS. The program also produces a report detailing EFT transactions for each customer. The script uses shared file access and dynamic file naming for flexibility, ensuring robust data handling in a multi-user environment.