Johnny,

Yes, the linkage editor can accept either object modules or load modules as
input in SYSLIB.

An object module is the output from the compiler (or Assembler) and is in
the form of 80-byte card images[1] (LRECL=80,RECFM=Fx where x may be nothing
or B ) suitable for input to the linkage editor and, of course, corresponds
to some file which is the input to the compiler (or Assembler).

[1] The "object module" may also be called an "object deck" because it can
take the physical form of a deck of 80-column punched cards - if you can
still find a card punch device anywhere. <g>

A load module is the output of the linkage editor and is in the form of
"undefined" length records (RECFM=U) suitable for, at least attempted, use
as an executable program or as again input to the linkage editor and
corresponds to one or more object modules or load modules which are input
to, and have been "linkaged" together by, the linkage editor.

Note: I believe you can pass a load module through the linkage editor as
many times as you like and I was going to say "you'll do it no harm" but I
seem to remember you might lose the entry point address so it can be done
but you'll need to do it with care.

Please post again if this is not clear - I felt myself going round in
circles trying to explain it all. <g>

Chris Mason

----- Original Message ----- 
From: "Johnny Luo" <[EMAIL PROTECTED]>
Newsgroups: bit.listserv.ibm-main
To: <[email protected]>
Sent: Thursday, 13 April, 2006 10:46 AM
Subject: What's the linkage editor really wants?


> Hi,
>
> I know this question looks a little silly.....but recently I found myself
a
> little bewildered on this issue.And because it's about the basics,so I
> raise it here.
>
> I'm using Enterprise Cobol for Z/os and to make things simple,I'll
> concentrate on batch Cobol program(no cics,no db2.....).
>
> Program B is a subprogram.
> Program A is calling prgram B:
>
> Call 'name-of-program-b'.
>
> And I set complier option to 'NODYN',so I'm sure this is a static call.
> Off course,becasue it's a static call,program A and program B must be
>  linked into a single load module.
>
> First I use IBM-supplied procedure IGYWCL to complie-and-link program B
> to a load module and place it in a library named 'johnny.cob.subpgm.load'.
>
> Then I do the same thing to program A.Becuase it statically calls program
B,
> I added 'johnny.cob.subpgm.load' to ddname 'SYSLIB' of step 'LKED'.
>
> Yes,there is no problem and the program A can run normally.
>
> Then why I got bewildered?
>
> Because I remember some books(for example,Murach's os/390 and z/os
> JCL) say that LKED.SYSLIB should contain 'object module' ,not 'load
module'.
> But in the above example,what I supplied to LKED.SYSLIb is a load module
> and it works too.
>
> I also refer to an old IBM doc and find a statement about linkage editor:
>
> 'Multiple object modules or load modules can be combined into a single
load
> module by the linkage editor.'
>
> So it seems that the input to linkage editor can be either object module
> or load module?If so,what's the difference between them? If a cobol
program
> statically called a subprogram,when linked,what's the linkage editor
really
> wants:the object module of that subprogram or the load module of that
> subprogram?
> Hope someone can give me some help on this.
>
> Thanks.
>
>
> --
> Best Regards,
> Johnny Luo

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to