Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

EXTERN & VCON & ACON usage

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Thu Feb 09, 2012 6:23 pm    Post subject: EXTERN & VCON & ACON usage
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10234
Location: italy

PostPosted: Thu Feb 09, 2012 6:42 pm    Post subject: Reply to: EXTERN & VCON & ACON usage
Reply with quote

the citation is nice,
Quote:
And the end of all our exploring
but You thought about getting there faster by asking icon_cool.gif

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
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Thu Feb 09, 2012 6:57 pm    Post subject: Reply to: EXTERN & VCON & ACON usage
Reply with quote

Hi Enrico,

Thank you for your reply icon_smile.gif

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10234
Location: italy

PostPosted: Thu Feb 09, 2012 7:00 pm    Post subject: Reply to: EXTERN & VCON & ACON usage
Reply with quote

using the EXTRN construct gives a better eyecatcher
nothing different as far as the <machine> code being generated
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Thu Feb 09, 2012 7:41 pm    Post subject: Reply to: EXTERN & VCON & ACON usage
Reply with quote

Enrico,

Thanks for your time.. Now I am clear with the concept..

Regards,
Yuge
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Feb 09, 2012 8:23 pm    Post subject: Reply to: EXTERN & VCON & ACON usage
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How can amount of the Storage Usage b... esduman61 CICS 6 Wed Mar 09, 2016 1:19 pm
No new posts Controlling usage of resources by tasks raja1128 CICS 3 Fri Nov 06, 2015 9:53 am
No new posts TDQ & its usage as ATI akodakka CICS 3 Sat Oct 17, 2015 6:04 pm
No new posts XPED - When command usage anand1204 Compuware & Other Tools 3 Tue Sep 15, 2015 12:50 am
No new posts Usage of NETRC for FTP step in JCL Vineetha_123 JCL & VSAM 3 Fri Jul 17, 2015 3:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us