Thread: COBOL

What does PERFORM THRU mean?

Started by Sam • user3 replies190 viewsLast activity 2 weeks ago
Post #1
0 votes
Sam
Reputation
5
Posts: 28
Joined: Jul 1, 2026, 2:30 PM
Posted: Jul 25, 2026, 9:34 AM

Keep seeing PERFORM 1000-INIT THRU 1000-EXIT. Why not just PERFORM 1000-INIT?

Post #2
0 votes
Marty
Reputation
412
Posts: 58
Joined: Aug 12, 2024, 9:14 AM
Posted: Jul 25, 2026, 12:34 PM

THRU runs from the first paragraph through the last one named, in source order. Old style wrapped a bunch of paragraphs as one unit ending at an EXIT paragraph.

Newer code often just PERFORM 1000-INIT with everything inside one paragraph or section. Both exist in the wild.

Post #3
0 votes
Rick
Reputation
302
Posts: 22
Joined: Jun 14, 2024, 9:41 AM
Posted: Jul 26, 2026, 11:34 AM

Watch GO TOs jumping out of a THRU range. That is how you get "fell through into the next paragraph" bugs.

You must be signed in to reply to this thread