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

can we PERFORM a SECTION if so give me an example


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

New User


Joined: 18 May 2006
Posts: 1
Location: Hyderabad

PostPosted: Wed Jun 07, 2006 12:57 pm
Reply with quote

can we PERFORM a SECTION if so give me an example
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Jun 07, 2006 2:04 pm
Reply with quote

yeap, we can perform a section

Eg:

Procedure division.
Perform A1000-INITIALIZE
Perform B2000-MAIN-PROCESS until end-of-file
Perform C3000-CLOSE-FILE.
Go back
A1000-INITIALIZE Section.
A1050-para.
Initialize ws-item1.
A1100-read-para
read file1 .
A1999-exit.
exit.
------

In this program first it will initialize ws-item1 then read record from file1 then pass the control to B2000-MAIN-PROCESS.

Hope it will be helpful
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Wed Jun 07, 2006 6:59 pm
Reply with quote

Yes..Why not??
We can definately perform a section, like we do in case of Paras.
the syntax and all remains the same.

Thanks
ap_mainframes
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Fri Jun 09, 2006 6:20 pm
Reply with quote

The main difference between section and a paragraph is that all the paras included in a section are executed where as in a para only the code in taht particular para gets executed.
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 COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Use of Perform Thru Exit COBOL Programming 6
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
No new posts How to give complex condition in JCL . CLIST & REXX 30
Search our Forums:

Back to Top