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

ENTRY statement is mandatory for IMS programs?


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 22
Location: Hyderabad

PostPosted: Thu Jul 03, 2008 4:26 pm
Reply with quote

I have seen some IMS programs with ENTRY statement and some without ENTRY statement.
Can anyone please explain me why?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Jul 03, 2008 8:44 pm
Reply with quote

Did you look to see if these programs actually issue IMS calls? Did you see a statement with the verb "using"? Take a look at the linkage section.
Back to top
View user's profile Send private message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 22
Location: Hyderabad

PostPosted: Fri Jul 04, 2008 9:40 am
Reply with quote

hi,

Yes, it has 'USING' statement. after posted, i learnt that IMS program can have either 'ENTRY' statement or 'USING' statement depending on Cobol version.
Back to top
View user's profile Send private message
mkarthikeyan

New User


Joined: 07 Aug 2008
Posts: 34
Location: Bangalore

PostPosted: Sun Aug 17, 2008 4:11 am
Reply with quote

What happens if you have both entry point and procedure division with USING verb? where the address is established?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Sun Aug 17, 2008 4:19 am
Reply with quote

You cannot have both statements. The "entry" statement connects directly "talking" to your IMS system. The "using" statement connects to a higher level routine which "talks" to IMS.
Back to top
View user's profile Send private message
mkarthikeyan

New User


Joined: 07 Aug 2008
Posts: 34
Location: Bangalore

PostPosted: Sun Aug 17, 2008 4:21 am
Reply with quote

What happens if you have both entry point and procedure division with USING verb? where the address is established?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Sun Aug 17, 2008 4:28 am
Reply with quote

You cannot have both.
Back to top
View user's profile Send private message
mkarthikeyan

New User


Joined: 07 Aug 2008
Posts: 34
Location: Bangalore

PostPosted: Sun Aug 17, 2008 4:50 am
Reply with quote

Sandy,
We can have both in the program. During migration, from VS-Cobol II to E-cobol I found both Entry and procedure division in a program.

Here is an example

PROCEDURE DIVISION USING PCB-EMPDB.
DISPLAY ' I AM BEFORE ENTRY'.
0000-MAIN-PARA.
ENTRY 'DLITCBL' USING PCB-EMPDB.

i would like to explain how the program acts in two scenario.

First case :
When the program is compiled and link-edit with link control card as
ENTRY DLITCBL, then IMS gives the control to the Entry point.
So the spool we cannot see the display ' I am before Entry'

Second case:
When the program is compiled and link-edit without link control card as
ENTRY DLITCBL, then IMS gives the control to the Procedure division and Entry statement will not be executed. So the spool will the display ' I am before Entry'.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Aug 17, 2008 6:00 am
Reply with quote

Hello,

And what is your point?

You have just demonstrated that you can use one or the other but not both?

Pick the one you want and use it. As you were told before, you cannot use both in the same program at the same time. . .
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Finding Assembler programs PL/I & Assembler 5
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
Search our Forums:

Back to Top