HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to COBOLVariablesArithmeticConditions (IF)Loops (PERFORM)
REFERENCE
📖 Overview
🖥️ Structure & Output
DISPLAY / DIVISIONs
📦 Variables
🔢 Arithmetic
🔀 Condition
🔁 Loop
COBOL›REFERENCE›Structure & Output›DISPLAY / DIVISIONs

DISPLAY / DIVISIONs

Writes to the screen; the program is divided into DIVISIONs.

Syntax

DISPLAY value.

Description

Every COBOL program is divided into divisions (DIVISION): IDENTIFICATION (name), DATA (data), PROCEDURE (commands). DISPLAY writes to the screen. Every statement ends with a period (.). STOP RUN ends the program.

Example

Loading editor…

Expected output

Hello World

When to use?

Output, message.

Common mistakes

  • ⚠️ Fixed format: DIVISION lines 7 spaces, statements further indented (~11 spaces).

Related commands

PIC / variable definition
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code