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

Whats difference between object code and load module?


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

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Wed Jan 21, 2009 10:20 am
Reply with quote

Please let me know Whats difference between object code and load module.
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 Jan 21, 2009 10:31 am
Reply with quote

Hello,

Object code is the output of a compile or an assembly.

A load module is the output of the linkage editor and is the executable.
Back to top
View user's profile Send private message
abhay pratap singh

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Wed Jan 21, 2009 10:39 am
Reply with quote

dick scherrer wrote:
Hello,

Object code is the output of a compile or an assembly.

A load module is the output of the linkage editor and is the executable.

But I want to know what is the difference between the output of compile and linkage editor. Why output of compile is not executable.
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 Jan 21, 2009 10:50 am
Reply with quote

Hello,

The difference is that one is object (intermediate) code and the other is executable (final).

Quote:
Why output of compile is not executable.
Because the environment is designed this way.

Not everything in an object module is resolved. The linkage editor uses the object module and other needed components as "input", resolves unresolved references, and formats the output as a load module that is stored in a load library. Compiled object output is considerably different than linkedited load module output.

If you browse the output from a compile and the output from the linkedit of the same program, you will notice considerable differences.

Do you have some requirement or is this primarily for learning?
Back to top
View user's profile Send private message
abhay pratap singh

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Wed Jan 21, 2009 10:53 am
Reply with quote

dick scherrer wrote:
Hello,

The difference is that one is object (intermediate) code and the other is executable (final).

Quote:
Why output of compile is not executable.

Do you have some requirement or is this primarily for learning?


This is just for learning.
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 Jan 21, 2009 11:18 am
Reply with quote

Hello,

Quote:
This is just for learning.
As more is learned, there will be more questions. Someone should be here to clarify when new questions arise.

At the top of the page there is a link to "IBM Manuals". Among the cobol material is the Enterprise COBOL Programming Guide. This manual has considerable material that will answer what you ask. It also far more info that will become useful. Much of what we are talking about is here:
2.0 Compiling and debugging your program
Back to top
View user's profile Send private message
km_abdullah

New User


Joined: 03 Nov 2008
Posts: 60

PostPosted: Wed Jan 21, 2009 11:57 am
Reply with quote

Hi Abhay,
Quote:

The linkage editor uses the object module and other needed components as "input", resolves unresolved references, and formats the output as a load module that is stored in a load library.


One example for the above is, if your program calls a subprogram then the location of load module of subprogram has to be mentioned in the linkediting step. This is one main difference b/w object code and load module.
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts How to load to DB2 with column level ... DB2 6
No new posts REASON 00D70014 in load utility DB2 6
Search our Forums:

Back to Top