Thread: COBOL

What are 88-levels for? Keep seeing them in copybooks

Started by Alex • user3 replies223 viewsLast activity 2 weeks ago
Post #1
0 votes
Alex
Reputation
8
Posts: 35
Joined: Jun 15, 2026, 9:20 AM
Posted: Jul 28, 2026, 11:50 AM

Saw this in a copybook:

01 WS-STATUS PIC X.
88 STATUS-OPEN VALUE 'O'.
88 STATUS-CLOSED VALUE 'C'.

What does 88 mean and why not just IF WS-STATUS = 'O'?

Post #2
1 votes
James
Reputation
524
Posts: 30
Joined: May 2, 2024, 8:00 AM
Posted: Jul 28, 2026, 1:50 PM

88 is a condition name. IF STATUS-OPEN reads clearer than IF WS-STATUS = 'O'. Same field underneath.

You can SET STATUS-OPEN TO TRUE which moves 'O' into WS-STATUS. Handy once you get used to it.

Post #3
0 votes
Anita
Reputation
118
Posts: 23
Joined: May 29, 2025, 12:45 PM
Posted: Jul 28, 2026, 6:50 PM

Also one 88 can list several values. 88 VALID-STATUS VALUE 'O' 'P' 'H'. Then IF NOT VALID-STATUS ...

You must be signed in to reply to this thread