What is the difference between SECTION and Paragraph?

All sort of Mainframes Interview Questions.
Post Reply
cobollearn
Registered Member
Posts: 25
Joined: Tue Jul 09, 2013 6:31 pm

What is the difference between SECTION and Paragraph?

Post by cobollearn »

Recently, in an interview I've been asked this - What is the difference between SECTION and Paragraph?

I answered that -- multiple paragraph makes a SECTION and a paragraph is a Paragraph.

Personally, I've never used SECTIONs, the question is -- why we needed them and when do we use them?

Can there be a rather formal definition of a Paragraph in COBOL?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: What is the difference between SECTION and Paragraph?

Post by Robert Sample »

SECTION actually has out-lived its usefulness in COBOL. Way back in the old days, when an IBM 360-30 had 64K (yes, that was 65536 total bytes) of memory, large programs were divided into SECTIONS for memory management. All SECTIONS with the same ID number were linked into one piece of the load module and that piece could overlay other sections with different ID numbers. This is before virtual memory, so consider the SECTION overlay concept as an early, manual form of memory swapping. The idea was to reduce the page faults and allow the programmer to determine how to write the code to allow for overlays.
cobollearn
Registered Member
Posts: 25
Joined: Tue Jul 09, 2013 6:31 pm

Re: What is the difference between SECTION and Paragraph?

Post by cobollearn »

Thanks Robert.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”