View previous topic :: View next topic
|
Author |
Message |
santohsks1987 Warnings : 1 New User
Joined: 29 Dec 2010 Posts: 31 Location: Mumbai
|
|
|
|
Hi everyone,
Please give me a brief description of the usage of 'SECTION' in the para names. What will be the effect if we dont include 'section' for the para names? How it differs from ordinary cobol pgm where we wont use section keyword. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if you would bother to read the manual,
you would see that when you perform a SECTION,
the return is before the next SECTION.
and a SECTION can cinsist of none or many paragraphs.
your understanding of 'ordinary' COBOL program is faulty.
a COBOL program is a COBOL program. some COBOL programs have imbedded SQL,
others have CALLs to CICS API's, IMS API's,, MQS API'sl...
some COBOL programs have all or just a couple of the above (or some not mentioned).
the functionality of of SECTION vs only PARAGRAPH has nothing to do with API's included. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
santohsks1987 - I don't understand selection of words in your "subject line"? As Dick has correctly said, the functionality of of SECTION vs only PARAGRAPH has nothing to do with API's included - so what exactly are you looking for with this question? |
|
Back to top |
|
|
santohsks1987 Warnings : 1 New User
Joined: 29 Dec 2010 Posts: 31 Location: Mumbai
|
|
|
|
Sorry guys.......
In CICS we use SECTION keyword. How is the program flow with SECTION and without SECTION. That is how does perform statement works with and without section.
Ex: 1000-main Section.
.......
......
2000-read.
.........
2000-exit.
3000-write.
..........
3000-exit.
.......
1000-exit.
5000-main section.
...............
5000-exit. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Suggest you go-through the reply from dbz again and browse through the manuals also.
A SECTION can contain more than one paragraph. Doing a PERFORM of a SECTION means multiple paragraphs may be executed. Having SECTION names in the PROCEDURE DIVISION is not required. Usage of SECTION, I've not seen much in currect times, however, long back when a mainframe could have as little as 64K of memory the SECTION names were numbered and these SECTION numbers were used to define the overlay structure; overlay-structre of the program. This use of SECTIONs allowed swapping of pieces of the program not currently in use out to "auxiliary storage". Since mainframes have more memory these days such a thing is no longer needed. |
|
Back to top |
|
|
santohsks1987 Warnings : 1 New User
Joined: 29 Dec 2010 Posts: 31 Location: Mumbai
|
|
|
|
Thnk u for the replies..... i got the answer i was lookin for......... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
you're welcome, have a good one . |
|
Back to top |
|
|
|