View previous topic :: View next topic
|
Author |
Message |
kris
New User
Joined: 16 Feb 2004 Posts: 6
|
|
|
|
THIS IS AN INTERVIEW QUESTION ASKED SOMETIME BACK.
what is the difference betwee section and paragraph.
*how do you recognize the begining of the section.
*how do you know, that the procedure ended.
Kris |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
1. Group of paragraphs is is a section. COBOL has pre-defined sections and user defined sections.
For example INPUT-OUTPUT SECTION, WORKING-STORAGE SECTION are pre-defined. You can define your own section in Procedure Division. (for example, SORT / MERGE I/O procedure sections)
2. I can't get your second question. If you are asking about cobol subprograms, the answer is: GO BACK or EXIT PROGRAM. If you are asking about JCL, the answer is PEND. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi kris,
There are 2 ways to end a SECTION:
1) End the pgm code.
2) Code the next SECTION.
This has been the cause of much Pgmr grief because failing to code SECTION after your section ends results in all the following pgraphs to become part of that previous section.
I kept forgetting to code SECTION so I opted for the less sexy but safer THRU.
Regards, Jack. |
|
Back to top |
|
|
kris
New User
Joined: 16 Feb 2004 Posts: 6
|
|
|
|
Thank's friends, for your response and answers.
Kris |
|
Back to top |
|
|
|