Use Cases Implemented by the Program¶
The call stack consists of the OCL script (AR931P.ocl36.txt), the RPGLE program (AR931P.rpgle.txt), and the RPG program (AR931.rpg36.txt). Together, they implement a single primary use case for generating an Accounts Receivable (A/R) Control File Listing report. Below is the identified use case:
- Generate Accounts Receivable Control File Listing Report:
- Description: This use case allows a user or system process to generate a formatted report listing details from the A/R control file (
ARCONT) for selected companies, including general ledger numbers, journal numbers, finance charge percentages, fiscal month, and aging bucket limits. The process involves validating input parameters (company selection, job queue option, and number of copies) and producing a printed report with headers and detail lines. - Components:
AR931P.ocl36.txt: Orchestrates the job flow, calling setup programs and conditionally executingAR931PandAR931.AR931P.rpgle.txt: Prompts for and validates user input (company selection, job queue, copies) via a display file, ensuring valid parameters are passed toAR931.AR931.rpg36.txt: ReadsARCONTrecords and generates the report, applying filtering and formatting rules.
- Inputs: Company selection (
ALLor specific companies), company numbers (up to three), job queue flag (YorN), number of copies. - Outputs: A printed report listing A/R control data for selected companies, with aging buckets based on invoice date (0-30, 31-60, 61-90, 91-120, over 120 days).
Function Requirement Document¶
Accounts Receivable Control File Listing Function Requirements¶
Purpose¶
To generate a formatted Accounts Receivable (A/R) Control File Listing report based on specified company selection, job queue settings, and number of copies, using data from the A/R control file (ARCONT).
Inputs¶
- Company Selection:
ALL(all companies) orCO(specific companies). - Company Numbers: Up to three company numbers (numeric, 2 digits each) if
COis selected. - Job Queue Flag:
Y(submit to job queue) orN(run interactively). - Number of Copies: Integer (minimum 1) for report copies.
- System Control Data: Optional company number from
GSCONTfor default settings.
Outputs¶
- Printed Report: Lists A/R control data for selected companies, including:
- Company number and name.
- A/R, cash, discount, intercompany, and finance G/L numbers.
- Next A/R and sales journal numbers.
- Finance charge percentage and security code.
- First fiscal month.
- Aging bucket upper limits (0-30, 31-60, 61-90, 91-120 days).
Process Steps¶
- Validate Inputs:
- Verify company selection is
ALLorCO. - If
CO, ensure at least one valid company number exists inARCONTand is not deleted (ACDEL ≠ 'D'). - If
ALL, ensure no company numbers are provided. - Validate job queue flag is
YorN. - Ensure number of copies is at least 1 (default to 1 if 0).
-
Check system control file (
GSCONT) for default company number; setALLif none provided. -
Read A/R Control Data:
- Access
ARCONTfile (256 bytes/record). - Filter out records with
ACDEL = 'D'. -
Apply company selection:
- If
ALL, include all non-deleted records. - If
CO, include only records matching specified company numbers.
- If
-
Generate Report:
- Print headers: report title, date, time, page number, and column labels (e.g., "CO#", "COMPANY NAME", "A/R G/L#").
- For each selected
ARCONTrecord, print:ACCO(company number),ACNAME(company name).ACARGL,ACCSGL,ACDSGL,ACICGL,ACFNGL(G/L numbers).ACARJ#,ACSLJ#(journal numbers).ACFINC(finance charge %),ACSECR(security code),ACFFMO(fiscal month).ACLMT1,ACLMT2,ACLMT3,ACLMT4(aging bucket limits).
- Use separator lines for readability.
-
Handle page overflow by reprinting headers.
-
Job Execution:
- If job queue flag is
Y, submit report generation to job queue. - If
N, run interactively. - Produce specified number of report copies.
Business Rules¶
- Company Selection:
- Must be
ALLorCO. COrequires 1–3 valid company numbers fromARCONT.ALLprohibits company number entries.- Aging Buckets:
- Based on invoice date (not due date), per revision (04/13/05):
- 0-30 days (
ACLMT1). - 31-60 days (
ACLMT2). - 61-90 days (
ACLMT3). - 91-120 days (
ACLMT4). - Over 120 days (implicit).
- 0-30 days (
- Record Filtering: Exclude deleted records (
ACDEL = 'D'). - Job Queue: Must be
YorN. - Copies: Minimum 1; default to 1 if invalid.
- Defaults: Use
GSCONTcompany number forCOselection if available; otherwise, default toALL.
Calculations¶
- Aging Buckets: No calculations in the function; bucket limits (
ACLMT1–ACLMT4) are stored inARCONTand printed as-is. - Page Numbering: Increment
PAGEfor each new page on overflow. - Date/Time: Capture system date and time for report header; format as MMDDYY and HHMMSS.
Dependencies¶
- Files:
ARCONT: A/R control data (input).GSCONT: System control data for default company (input).PRINT: Printer file for report output.- System: IBM System/36 or AS/400 environment with job queue support.
Error Handling¶
- Return error if:
- Company selection is not
ALLorCO. COselected with invalid or missing company numbers.ALLselected with company numbers provided.- Job queue flag is not
YorN. - Cancel process if user or system signals cancellation (sets
KYCANC = 'CANCEL').