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

Load module of called module


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 38
Location: Denver

PostPosted: Wed Dec 15, 2010 9:21 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 15, 2010 9:35 pm
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

Moderator Emeritus


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

PostPosted: Wed Dec 15, 2010 9:41 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 15, 2010 10:00 pm
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

Moderator Emeritus


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

PostPosted: Thu Dec 16, 2010 12:24 am
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Dec 16, 2010 12:32 am
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

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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts How to load to DB2 with column level ... DB2 6
No new posts REASON 00D70014 in load utility DB2 6
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts DB2 Load - Sort Or order BY DB2 1
Search our Forums:

Back to Top