Showing posts with label short. Show all posts
Showing posts with label short. Show all posts

Shortest COBOL program that runs successfully

The below is the shortest COBOL code that will compile and execute successfully. It can be used to generate the compiler listing with explanations.


Shortest COBOL Program which ABENDs during execution

The shortest COBOL code that will compile successfully but ABEND during execution is of 3 lines. 






But if NOCMPR2 Compiler Option (obsolete with Enterprise COBOL) is used, the PROCEDURE DIVISION is not needed thus reducing it to 2 lines.