In this topic, we described about the Compiler-directive Statements with detailed example.
A compiler-directive statement that causes the compiler to take a specific action during compilation. We can use compiler-directive statements for the below purposes -
- Extended source library control (BASIS, DELETE and INSERT statements).
- Source text manipulation (COPY and REPLACE statements).
- Exception handling (USE statement).
- Controlling compiler listings (*CONTROL, *CBL, EJECT, TITLE, SKIP1, SKIP2 and SKIP3 statements).
- Specifying compiler options (CBL and PROCESS statements).
- Specifying COBOL exception handling procedures (USE statements).
The following compiler directive statements have no effect - ENTER, READY or RESET TRACE and SERVICE RELOAD. Below is the list of compiler-directive statements -