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