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

What are the function of EJECT and CONTINUE in cobol


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
asish2006
Currently Banned

New User


Joined: 02 Nov 2006
Posts: 4
Location: India

PostPosted: Wed Nov 22, 2006 12:17 pm
Reply with quote

what are the function of EJECT and CONTINUE in cobol?

WARNING: TITLE EDITED
Back to top
View user's profile Send private message
guptae

Moderator


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

PostPosted: Wed Nov 22, 2006 12:28 pm
Reply with quote

Hi Ashish,

Eject:It is a printer command to print the next statement onwards at the top of the next page.

Continue:It will take u to next logical stmt.

Code:
PERFROM 1000-PARA VARYING I FROM 1 BY 1 UNTIL I= 10 .
PERFORM 2000-PARA.
 
1000-PARA.
  IF I =5
      CONTINUE/NEXT SENTENCE
  END-IF.

2000-PARA.
  DISPLAY I. 


In the above code if we code continue then when I=5 it wont come out from the loop & it will execute for I=6 till I= 10 & then it will execute 2000-PARA & will display 10 but if we code next sentence it will come out from the loop & execute 2000-PARA. in that case it will display 5.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top