Certainly! Here’s an example of a “Hello, World!” program written in COBOL:
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO-WORLD. AUTHOR. YOUR-NAME. PROCEDURE DIVISION. DISPLAY 'Hello, World!'. STOP RUN.
In COBOL, the program structure is divided into various divisions. The
IDENTIFICATION DIVISION specifies the program name and the author’s name. The
PROCEDURE DIVISION contains the actual logic of the program.
In this example, the
DISPLAY statement is used to output the text “Hello, World!” to the console. The
STOP RUN statement is used to terminate the program.
Please note that COBOL is typically written in uppercase letters, but it’s not mandatory. Also, make sure to adjust the program structure and syntax based on the specific requirements of your COBOL compiler or environment.