What is the difference between Object code and Source code?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

What is the difference between Object code and Source code?

Postby ramesh4mainframes » Mon Jul 19, 2010 3:06 pm

Hi,

When we compile the program the source code will load into Load modules. I have read that Source code become Object code. Is it true?
Thanks,
RamS
ramesh4mainframes
 
Posts: 32
Joined: Mon Jun 07, 2010 3:58 pm
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

Re: What is the difference between Object code and Source code?

Postby NicC » Mon Jul 19, 2010 3:30 pm

Yes, it is true. The object module is then linked into the final program along with the various routines required e.g. read/write. Suggest you get a beginners book - this will be explained. Something like COBOL for Dummies. I am not trying to be funny or rude - I use this book myself along with others. It comes with compilers for the PC so, if you do not have access to your normal machine then you can learn at home. One thing, it does seem to be a bit old now (1997) but the basics do not change!

Whilst researching this I came across SAMS Teach Yourself COBOL in 24 hours. Again an old book but again it has a PC compiler (which may not work with WIN/V WIN/7).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: What is the difference between Object code and Source code?

Postby nagendra » Mon Jul 19, 2010 4:13 pm

hiiiii,

yes, i heard this when one of my seniour was teaching me...

its true....
Nagendra
nagendra
 
Posts: 21
Joined: Mon Jul 19, 2010 12:18 pm
Location: bangalore
Has thanked: 0 time
Been thanked: 0 time

Re: What is the difference between Object code and Source code?

Postby dick scherrer » Mon Jul 19, 2010 11:37 pm

Hello,

Source code is what the developer writes and is input to the compiler. Object code is output from the compiler.

Object code is combined (linkedited) with other code and the output of this is a load module. If you look at the output of a linkage editor step, you will see many components that are linked in automatically.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post