Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
sections and paragraphs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
kris

New User


Joined: 16 Feb 2004
Posts: 6

PostPosted: Mon Feb 16, 2004 10:28 pm    Post subject: sections and paragraphs
Reply with quote

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
View user's profile Send private message
References
PostPosted: Mon Feb 16, 2004 10:28 pm    Post subject: Re: sections and paragraphs Reply with quote

mcmillan

Site Admin


Joined: 18 May 2003
Posts: 903
Location: India

PostPosted: Tue Feb 17, 2004 8:21 am    Post subject: Re
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1493

PostPosted: Wed Feb 18, 2004 12:29 am    Post subject:
Reply with quote

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. icon_smile.gif

Regards, Jack.
Back to top
View user's profile Send private message
kris

New User


Joined: 16 Feb 2004
Posts: 6

PostPosted: Thu Feb 19, 2004 2:54 am    Post subject:
Reply with quote

Thank's friends, for your response and answers.

Kris
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1