IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

ENTRY statement is mandatory for IMS programs?

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> IMS DB/DC
View previous topic :: View next topic  
Author Message
Bharath Nadipally



Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

Posted: Thu Jul 03, 2008 4:26 pm    Post subject: ENTRY statement is mandatory for IMS programs?  

I have seen some IMS programs with ENTRY statement and some without ENTRY statement.
Can anyone please explain me why?
Back to top  
Sandy Zimmer



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

Posted: Thu Jul 03, 2008 8:44 pm    Post subject:  

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  
Bharath Nadipally



Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

Posted: Fri Jul 04, 2008 9:40 am    Post subject:  

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  
mkarthikeyan



Joined: 07 Aug 2008
Posts: 26
Location: Bangalore

Posted: Sun Aug 17, 2008 4:11 am    Post subject: Reply to: ENTRY statement is mandatory for IMS programs?  

What happens if you have both entry point and procedure division with USING verb? where the address is established?
Back to top  
Sandy Zimmer



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

Posted: Sun Aug 17, 2008 4:19 am    Post subject:  

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  
mkarthikeyan



Joined: 07 Aug 2008
Posts: 26
Location: Bangalore

Posted: Sun Aug 17, 2008 4:21 am    Post subject: Reply to: ENTRY statement is mandatory for IMS programs?  

What happens if you have both entry point and procedure division with USING verb? where the address is established?
Back to top  
Sandy Zimmer



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

Posted: Sun Aug 17, 2008 4:28 am    Post subject:  

You cannot have both.
Back to top  
mkarthikeyan



Joined: 07 Aug 2008
Posts: 26
Location: Bangalore

Posted: Sun Aug 17, 2008 4:50 am    Post subject: Reply to: ENTRY statement is mandatory for IMS programs?  

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  
dick scherrer



Joined: 23 Nov 2006
Posts: 8732
Location: 221 B Baker St

Posted: Sun Aug 17, 2008 6:00 am    Post subject:  

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  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> IMS DB/DC
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM