IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

sections and paragraphs


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kris

New User


Joined: 16 Feb 2004
Posts: 6

PostPosted: Mon Feb 16, 2004 10:28 pm
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
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1207
Location: India

PostPosted: Tue Feb 17, 2004 8:21 am
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: 1592

PostPosted: Wed Feb 18, 2004 12:29 am
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
Reply with quote

Thank's friends, for your response and answers.

Kris
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Sections: need one appearance of cer... DFSORT/ICETOOL 4
No new posts How to get unique count inside dfsort... DFSORT/ICETOOL 7
No new posts SECTIONS= summarization with multiple... DFSORT/ICETOOL 1
No new posts Story about SECTIONS/PARAGRAPHS/&... General Talk & Fun Stuff 0
No new posts SORT making groups or sections with ... DFSORT/ICETOOL 6
Search our Forums:

Back to Top