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

ENTRY statement


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

New User


Joined: 15 Mar 2005
Posts: 4
Location: Chennai

PostPosted: Sat Mar 19, 2005 11:19 am
Reply with quote

Hi friends,
Plz answer for the below query.

Does the ENTRY statement used in sub-programs only.
Please explain with example where this ENTRY statement is used

-Sameer
09443605966
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sun Mar 20, 2005 2:09 am
Reply with quote

Quote:
Does the ENTRY statement used in sub-programs only.


The question is wrong. As for as I know, you cannot use ENTRY statement in subprograms. You can use only in main program.

Please explain with example where this ENTRY statement is used

Code:
ENTRY PGM2 USING X, Y.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Mar 21, 2005 2:23 am
Reply with quote

Hi Sameer,

The ENTRY stmt was designed primarily for specifying alternate entry pts to subpgms. The primary entry pt is supplied automatically by the compiler.

I've never tried to execute a pgm from the JCL EXEC stmt using an alternate EP. It should be easy enough to test. But remember, that subpgms usually process data passed from the CALLer. This you can't simulate from the JCL. (You can, really, but it's messy.)
Back to top
View user's profile Send private message
ensameer

New User


Joined: 15 Mar 2005
Posts: 4
Location: Chennai

PostPosted: Mon Mar 21, 2005 9:52 am
Reply with quote

Hi,
Thanks priya and mmwife for ur reply.

So, is this ENTRY statement used to enter into some entry point of a subprogram ? Is this same as PERFORM statement which is used to enter into a para of same program.

-Sameer
09443605966
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 JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts process statement for SUPREC, CMPCOLM... TSO/ISPF 4
No new posts SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
No new posts DFDSS COPY using Filter REFDT statement JCL & VSAM 2
Search our Forums:

Back to Top