| applyTo | **/*.cob |
|---|
When analyzing COBOL code in this workspace, use these instructions to understand its structure, business logic, and data flow.
- IDENTIFICATION DIVISION: Program metadata (PROGRAM-ID)
- DATA DIVISION: Variable declarations in WORKING-STORAGE and LINKAGE sections
- PROCEDURE DIVISION: Business logic and program flow
- Data definitions: PIC clauses define data types (9 = numeric, X = alphanumeric, V = decimal point)
- Program calls: CALL statements indicate inter-program communication
- Control flow: PERFORM, EVALUATE, IF/ELSE structures
- Data operations: MOVE, ADD, SUBTRACT, MULTIPLY, DIVIDE
When asked to explain COBOL code:
- Identify the program's purpose from PROGRAM-ID and overall structure
- Document all data elements and their constraints
- Trace the business logic in PROCEDURE DIVISION
- Note any inter-program dependencies (CALL statements)
- Identify business rules embedded in conditional logic
When extracting specifications from COBOL, produce plain-language descriptions that:
- A non-programmer domain expert could verify
- Capture business rules, not implementation details
- Document edge cases and error handling
- Note any implicit assumptions in the code