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
 

 

Load module of called module

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 35
Location: Denver

PostPosted: Wed Dec 15, 2010 9:21 pm    Post subject: Load module of called module
Reply with quote

Hi

I have a COBOL program CALLing another COBOL program.
As part of some cleanup activity, the load module of the called program is deleted from the loadlib. I am in the process of putting it back. But I have this job executing today. I was wondering whether my program will abend when it tries to call the sub program.

How does the loadlibs work. Is the load of called program already embedded in the calling program at the time of compilation. Or is it picked up real time
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Wed Dec 15, 2010 9:35 pm    Post subject:
Reply with quote

Quote:
How does the loadlibs work. Is the load of called program already embedded in the calling program at the time of compilation. Or is it picked up real time
Yes.

There are two types of subprograms -- static and dynamic. A static subprogram is compiled into the load module when the calling program is compiled. The load module, therefore, has everything needed to run. A dynamic subprogram is not linked into the load module when the calling program is compiled. The subprogram must, therefore, be located in a load library when the calling program invokes the subprogram at run time.

How your question is answered depends upon the type of subprogram being used.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Dec 15, 2010 9:41 pm    Post subject:
Reply with quote

Hello,

Quote:
As part of some cleanup activity, the load module of the called program is deleted from the loadlib.
Suggest you retrieve the load module(s) from the backup that was made before the cleanup was done. You DO have a backup . . .?

If a specific backup was not take immediately before the cleanup, there should be an older backup of the library that will have the load module(s) that were mistakenly deleted.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Wed Dec 15, 2010 10:00 pm    Post subject:
Reply with quote

Quote:
You DO have a backup . . .?
Dick: the IBM Pollyanna Principle in action? icon_biggrin.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 16, 2010 12:24 am    Post subject: Reply to: Load module of called module
Reply with quote

Hi Robert,

Or as Bill Thompson used to say. . .

Backups - we don' need no steenkin' backups. . .

icon_cool.gif
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 Dec 16, 2010 12:32 am    Post subject: Reply to: Load module of called module
Reply with quote

Beginning at Offset X'84' (relative to zero) of the Calling Load Module, get the value of this first-byte. If the fifth-bit (relative to zero) of this first-byte is "ON" (Bit '1'), then the program was compiled with the "Dynam" Compiler option and the sub-program will be accessed via a Dynamic "CALL". From what you've said, you'll probably get an "S806" abend (Module Not Found) if a Dynamic "CALL" is issued by the Calling module.

Offset X'84' is the starting point for the Cobol Signature/Info Bytes in a given Load Module.

Review the link below....

Bill

http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entcobol.doc_4.1/PGandLR/ref/rpbug03.htm
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 16, 2010 2:03 pm    Post subject:
Reply with quote

Bill,

just so happens that the link you provided is a welcome piece of info for one of my co-workers.

great link.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
This topic is locked: you cannot edit posts or make replies. How to supply called sub-program from... dchristensen JCL & VSAM 25 Wed Sep 14, 2016 11:36 pm


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