Page 1 of 1

What is the difference between SECTION and Paragraph?

Posted: Thu Jul 11, 2013 3:03 pm
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?

Re: What is the difference between SECTION and Paragraph?

Posted: Thu Jul 11, 2013 3:19 pm
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.

Re: What is the difference between SECTION and Paragraph?

Posted: Tue Apr 29, 2014 1:39 pm
by cobollearn
Thanks Robert.