Cross-Application / Cross-Library Access


i would like to give the following scenario:
a) System/Application “A”, resides in Library “A”
b) System/Application “B”, resides in Library “B”
c) System/Application “A” CALLNATs a subprogram in Library “B”, and vice versa

my questions:
a) what should the Natural Administrator do in order to allow/permit cross library access?
b) please let me know the steps or the options on how the above can be implemented.

thank you,


Assuming you are using Natural Security, then add library “A” as a STEPLIB of library “B” and vice-versa.

hi Mr Kelly,

first of all thanks again for your input.

may i ask how the setup would be if it were an Online program calling the Subprogram in another library?

i heard from somewhere that the “shared” subprograms should be located in a “shared/common” library, or something to the effect but i have no idea how accurate this is.

in case the above is true, i’m also interested if there’s another way of implementing it. it would be nice if Subprogram of “A” remains in Library “A” and just allow Application “B” to have access to it.

really appreciate your help.



There are few places where Natural cares whether you are running on-line or in batch, and this is not one of them.

Your STEPLIBs will be the same whether you are on-line or batch. Your common subprogram could be placed in a separate library, but it’s not necessary. It’s up to your Natural Administrator to decide. If you implement this common library, say LIBC, then have it STEPLIBed to your LIBA and LIBB application libraries.

To execute a common subprogram, Natural will need to locate it in LIBC, which means that it will have searched LIBA or LIBB first. This extra search is overhead, but will be negligible if you have your Buffer Pool sized properly (again, set by your Natural Administrator). Once found, your subprogram is loaded into the Buffer Pool for execution. On subsequent calls, Natural will find the module in the Buffer Pool, so the searches of your application libraries will be unnecessary.

hi Ralph Zbrog,

thank you for the explanation. i really appreciate it.