View previous topic :: View next topic
|
Author |
Message |
yugendran
New User
Joined: 14 Dec 2007 Posts: 51 Location: indore
|
|
|
|
Hi,
I need few clarifications on understanding the usage of below things.
EXTERN => when & where it will be used. If the usage is exposing a address variable to another subroutine why cant do this using V type address constants.
V Constants => For external programs and will be used in calling program .. will be resolved while linking.
A Constants => For internal sub programs.
How EXTERN differs on purpose..
Thanks,
Yuge |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the citation is nice,
Quote: |
And the end of all our exploring |
but You thought about getting there faster by asking
if You had explored You would have found that
Code: |
000010 EXTRN EXT1
000011 AEXT1 DC A(EXT1)
|
is equivalent to
Code: |
000012 AEXT1 DC V(EXT1) |
and that
Code: |
000011 AEXT1 DC A(EXT1)
|
without the external gives an error |
|
Back to top |
|
|
yugendran
New User
Joined: 14 Dec 2007 Posts: 51 Location: indore
|
|
|
|
Hi Enrico,
Thank you for your reply
Actually I googled it.. But couldn't find a useful link.. So posted here..
Now I understand the concept..
Just curious to know - is there any specfic usage for declaring something with A Constant and Extrn in pair.
Thanks,
Yuge |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
using the EXTRN construct gives a better eyecatcher
nothing different as far as the <machine> code being generated |
|
Back to top |
|
|
yugendran
New User
Joined: 14 Dec 2007 Posts: 51 Location: indore
|
|
|
|
Enrico,
Thanks for your time.. Now I am clear with the concept..
Regards,
Yuge |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
A VCON is a load module which had been included (resolved/merged) as part of the calling load module during link edit. Your link edit map should show this as being resolved. In COBOL terminology, this would be known as a Statically-Called sub-program.
An ADON/EXTRN (not resolved during link edit and is a dynamically loaded load module) can be accessed via an MVS "LINK" Macro
- O R -
Loaded yourself via an MVS "LOAD" Macro, where the LP address is returned in R0. From there, you build your R1 parmlist and load R0 into R15, followed by a BALR/BASM R14,R15 instruction to the sub-program.
Note: The MVS "LINK" Macro and MVS "Load" Macro should NEVER be used in a CICS environment.
In all cases, the called sub-program should return a return-code value to the caller in R15 to check for success or failure.
Mr. Bill |
|
Back to top |
|
|
|