How lifeisox/cobol-project-4 works
Project type and purpose
• This is a COBOL‐based batch and online business programming project that manipulates an inventory master file, transaction file, suppliers file, and produces reports.
• It consists of several standalone COBOL programs (batch update, file conversion, online update, reporting) plus shared copybooks and called modules.
File structure
• Top‐level COBOL sources:
• BatchUpdate.cbl – Master file batch update
• ConvertToIndex.cbl – Conversion to indexed sequential files
• OnlineUpdate.cbl – Interactive (online) updates via screen I/O
• InventReport.cbl – Inventory report from indexed master
• ComputeValue.cbl – Called routine to compute inventory value
• Shared record definitions:
• InventRecord.cpy – Inventory record copybook
• README.md defines file names, sequencing, and processing requirements.
Main components of the system
a. Batch Update Program (BatchUpdate.cbl)
• Reads: INVENT4.txt (Master), TRANSACTIONS.TXT (Transaction)
• Uses EVALUATE to route transaction types
• Writes: INVENT5.txt (Updated Master)
b. File Conversion Program (ConvertToIndex.cbl)
• Reads: INVENT5.txt, SUPPLIERS.txt
• Writes: INVENT6 (Indexed Master), SUPPLIERI (Indexed Suppliers)
c. Online Update Program (OnlineUpdate.cbl)
• Screen Section for user input (interactive transactions)
• Reads/Writes: INVENT6 (Indexed Master), SUPPLIERI
d. Reporting Programs
• InventReport.cbl – Reads INVENT6, calls ComputeValue.cbl, outputs inventory report
• Re‐Order Report – (can be added or integrated) reads INVENT6 + SUPPLIERI to join and display re‐order data
e. Shared Libraries
• ComputeValue.cbl – business logic module (called via CALL)
• InventRecord.cpy – COPY’d into programs for record layouts
Relationships and data flows
• BatchUpdate → updates flat master → output INVENT5
• ConvertToIndex reads INVENT5 & SUPPLIERS.txt → outputs two indexed files
• OnlineUpdate uses indexed files for CRUD‐style updates
• InventReport and Re‐Order Report both read indexed files; reports call ComputeValue
Architectural patterns and design principles
• Modularization: each COBOL program implements one major function
• Reuse via COPY (for record definitions) and CALL (for ComputeValue logic)
• Single source of truth for files, sequential→indexed transitions
• Batch vs. online separation: scheduled batch + interactive module
Relevant technologies, frameworks, libraries
• COBOL 85 (or above) runtime
• Indexed Sequential Access Method (ISAM) for INVENT6/SUPPLIERI
• Screen Section for CICS‐like interactive I/O in OnlineUpdate