Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Static linking and Dynamic linking in Assembler

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

New User


Joined: 04 Apr 2007
Posts: 17
Location: Chennai

PostPosted: Thu Mar 13, 2008 9:02 pm    Post subject: Static linking and Dynamic linking in Assembler
Reply with quote

We know that in COBOL we use
call "program-1" to statically link program-1 to main program

and
move "program-1" to myprog
call myprog to dynamicall link program-1 to main program.

How can we achive this (Static link and Dynamic linking) in Assembler.

Thanks
Ganesh
Back to top
View user's profile Send private message

Mistermind
Warnings : 2

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Sun Mar 16, 2008 1:30 am    Post subject:
Reply with quote

Ordinary linkedit will pick up assembler subroutines invoked by IBM "CALL" macro.

To invoke a dynamic subroutine, invoke IBM macro LOAD (check out the parameters), then simply branch to the first byte of the loaded subroutine loadmodule. Upon completion the subroutine will return control to the calling module.
Back to top
View user's profile Send private message
Mistermind
Warnings : 2

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Sun Mar 16, 2008 1:32 am    Post subject:
Reply with quote

You will need to GETMAIN to ensure storage is available for you dynamic subroutine. You can load your subrtn below or above the line. The LOAD will be executed once only, before the first execution of the subrtn.
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 Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Sr SW Eng-Rocket Software (Assembler,... Kenneth Barton Lasky Mainframe Jobs 0 Fri Aug 25, 2017 12:29 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us