COBOL Examples
Introduction -
COBOL examples cover a range of examples related to COBOL programming language, including syntax, file handling, data manipulation, program structure, file organization, record processing, subroutine calls, data division elements, error handling, and other topics.
Objective and Audiences -
We have covered the examples for the complete list of topics that almost covers 99% of COBOL language programming. These examples aim to improve the candidate's your technical expertise and experience, as well as their problem-solving abilities and also helps to resolve the issues occurred while coding.
Examples List -
- COBOL Examples
- Basics
- Hello World Program Example
- Coding Sheet
- Divisions
- Data Item Declaration
- 66 Level Number - Renaming Entire Group Example
- 66 Level Number - Renaming Elementary Variables Example
- 77 Level Number Example
- 88 Level Number Example
- 88 Level Number - Single Value Example
- 88 Level Number - Multiple Values Example
- 88 Level Number - Range of Values Example
- Data Item Example
- Simple Insertion Editing Example
- Special Insertion Editing Example
- Fixed Insertion Editing Example
- Floating Insertion Editing Example
- Zero Supression and Replacement Editing Example
- Value Clause Example
- Blank When Zero Clause Example
- Justified Clause Example
- Data References
- Data Types
- Input Output Statements
- Data Movement Statements
- String Handling Statements
- Conditional Statements
- Simple IF Example
- If..Else Example
- Nested If Example
- Nested If..Else Example
- Simple Evaluate Example
- Evaluate True Example
- Evaluate THRU Example
- Evaluate using Multiple When Conditions Example
- Evaluate with Multiple Conditions Example
- Condition Names Example
- Condition Names - Single Value Example
- Condition Names - Multiple Value Example
- Condition Names - Range of Values Example
- Continue Statement Example
- Next Sentence Example
- Looping Statements
- Inine Perform Example
- Outline Perform Example
- Perform Through Example
- Inline Perform Times Example
- Outline Perform Times Example
- Inline Perform Until Example
- Outline Perform Until Example
- Inline Perform with Test Before Until Example
- Outline Perform with Test Before Until Example
- Inline Perform with Test After Until Example
- Outline Perform with Test After Until Example
- Inline Perform Varying Example
- Outline Perform Varying Example
- Arithmetic Statements
- Simple ADD Example
- ADD Rounded Example
- ADD GIVING Example
- ADD CORRESPONDING Example
- ADD ON SIZE ERROR Example
- Simple SUBTRACT Example
- Subtract Rounded Example
- Subtract with Giving Example
- Subtract with Corresponding Example
- Subtract On Size Error Example
- Simple MULTIPLY Example
- Multiply Rounded Example
- MULTIPLY with Giving Example
- MULTIPLY On Size Error Example
- Simple DIVIDE Example
- DIVIDE Into Example
- DIVIDE By Example
- DIVIDE Giving Example
- DIVIDE Rounded Example
- DIVIDE Giving and Remainder Example
- DIVIDE On Size Error Example
- Simple Compute Example
- Compute Rounded Example
- Compute On Size Error Example
- Table Processing
- Array Example
- OCCURS Clause Example
- Single Dimension Array Example
- Two Dimensional Array Example
- Three Dimensional Array Example
- Fixed length Tables Example
- Variable length Tables Example
- Array Index Example
- Single Dimension Array with Index Example
- Two Dimensional Array with Index Example
- Three Dimensional Array with Index Example
- ARRAY Subscript Example
- Single Dimension Array with Subscript Example
- Two Dimensional Array with Subscript Example
- Three Dimensional Array with Subscript Example
- Search Example
- Search All Example
- Memory Management
- Redefines Example
- Redefining Variable with Same Length Example
- Redefining Variable with Different Length Example
- RENAMES Clause Example
- Renaming Entire Group Example
- Renaming Elementary Variables Example
- SYNCHRONIZED Clause Example
- DISPLAY Computation Example
- Computation Example
- COMP-1 Example
- COMP-2 Example
- COMP-3 Example
- File Declarations
- File Access Modes
- File Processing
- File Processing
- Reading Fixed Length PS File Sequentially Example
- Updating a Record in Fixed Length PS File Example
- Deleting Record from Fixed Length PS File Example
- Write Record into Fixed Length PS File Example
- Reading Variable Length PS File Sequentially Example
- Updating a Record in Variable Length PS File Example
- Deleting Record from Variable Length PS File Example
- Write Record into Variable Length PS File Example
- Reading Fixed Length Indexed File Sequentially Example
- Reading Fixed Length Indexed File Randomly Example
- Reading Fixed Length Indexed File Dynamically Example
- Fixed Length Indexed File Browse Example
- Updating a Record in Fixed Length Indexed File Example
- Deleting Record from Fixed Length Indexed File Example
- Write Record into Fixed Length Indexed File Example
- Reading Variable Length Indexed File Sequentially Example
- Reading Variable Length Indexed File Randomly Example
- Reading Variable Length Indexed File Dynamically Example
- Variable Length Indexed File Browse Example
- Updating a Record in Variable Length Indexed File Example
- Deleting Record from Variable Length Indexed File Example
- Write Record into Variable Length Indexed File Example
- Reading Fixed-length Relative File Sequentially Example
- Internal Sorting
- Program Communication Statements
- Call Statement Example
- Static CALL Example
- Dynamic CALL Example
- Call Using Parameters Example
- CALL With Returning Example
- CALL Using by Reference Example
- CALL Using by Value Example
- Cancel Statement Example
- Receiving data from JCL PARM Example
- STOP RUN Example
- EXIT Program Example
- GOBACK Example
- Unconditional GO TO Example
- Conditional GO TO Example
- GO TO with IF Example
- Subroutines (INLCUDE Stmt) Example
- Error Handling
- Compiler-directive Statements