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

EXTERN & VCON & ACON usage


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 09, 2012 6:42 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 09, 2012 7:00 pm
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Feb 09, 2012 8:23 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
No new posts Usage of BINSEARCH PL/I PL/I & Assembler 1
Search our Forums:

Back to Top