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

What is EJECT verb in COBOL


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

New User


Joined: 07 Mar 2005
Posts: 1

PostPosted: Mon Mar 07, 2005 12:44 pm
Reply with quote

What is EJECT doing in a cobol prg.
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 84
Location: In my tiny cubicle ...

PostPosted: Mon Mar 07, 2005 11:46 pm
Reply with quote

What do the manuals say?

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


    ___ Format _____________________________________________________________
   |                                                                        |
   | >>__EJECT__ ___ ____________________________________________________>< |
   |            |_._|                                                       |
   |                                                                        |
   |________________________________________________________________________|




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 marker, 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
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Tue Mar 08, 2005 10:58 am
Reply with quote

Hi Mohanraz,

EJECT statement will EJECT one blank paper before printing.

Bye,
Reddy.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Mar 13, 2005 7:34 am
Reply with quote

Hi Mo,

EJECT is a compiler directing stmt. That means it doesn't find its way in to the pgm you're compiling.

It directs the compiler to print the next line of the compiler printout to the top of the next page.

Take the time to peruse the manual periodically. You'll learn a lot more.
Back to top
View user's profile Send private message
aabhas

New User


Joined: 22 Mar 2005
Posts: 2

PostPosted: Wed Mar 23, 2005 1:27 pm
Reply with quote

The EJECT statement is a compiler-directing statement, provided as an
IBM extension, which causes the compiler to perform a page eject
operation on the source listing. The next source statement line (i.e.,
the line following the EJECT statement) is then printed at the top of
the next page.

Format
------
EJECT

EJECT may appear in either Area A or Area B but must be the only
statement on the line. It may be followed by an optional period.
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