View previous topic :: View next topic
|
Author |
Message |
manugeorge2004
New User
Joined: 17 Jun 2009 Posts: 38 Location: Denver
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
You DO have a backup . . .? |
Dick: the IBM Pollyanna Principle in action? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Robert,
Or as Bill Thompson used to say. . .
Backups - we don' need no steenkin' backups. . .
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|