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

EJECT verb in COBOL


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

New User


Joined: 13 Jun 2005
Posts: 6

PostPosted: Mon Jun 20, 2005 3:47 pm
Reply with quote

explain about the EJECT verb ?

whether it will only come with called pgms or it will also come at the end of the main pgms.?

is it differnet from other end verbs (STOP RUN, EXIT PROGRAM & END PGM) ?
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Mon Jun 20, 2005 3:53 pm
Reply with quote

Hi,
Check this
ibmmainframes.com/viewtopic.php?t=3581
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jun 21, 2005 8:15 am
Reply with quote

EJECT is one of the compiler directing stmts in COBOL. Another is SKIP n.

When the compiler prints the listing of your source code everthing following the EJECT will start at the top of a new page.

Similarly SKIP n will skip n lines before continuing to print. One line is the default.

They can be used anywhere in the pgm code on a separate line and they are not pprinted in the listing.
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Tue Jun 21, 2005 10:35 am
Reply with quote

The EJECT statement specifies that the next source statement is to be
printed at the top of the next page.

The EJECT statement must be the only statement on the line. It can be
written in either Area A or Area B, and can be terminated with a separator period.

The EJECT statement must be embedded in a program source. For example, in the case of batch applications, the EJECT statement must be placed between the CBL (PROCESS) statement and the end of the program (or the END PROGRAM header, if specified).

The EJECT statement has no effect on the compilation of the source program itself.
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 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