View previous topic :: View next topic
|
Author |
Message |
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
|
|
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
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
|
|
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
New User
Joined: 07 Aug 2008 Posts: 34 Location: Bangalore
|
|
|
|
What happens if you have both entry point and procedure division with USING verb? where the address is established? |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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
New User
Joined: 07 Aug 2008 Posts: 34 Location: Bangalore
|
|
|
|
What happens if you have both entry point and procedure division with USING verb? where the address is established? |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
You cannot have both. |
|
Back to top |
|
|
mkarthikeyan
New User
Joined: 07 Aug 2008 Posts: 34 Location: Bangalore
|
|
|
|
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
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|