Why does StEPLIB always override JOBLIB in the JCL?

In the JCL, STEPLIB always overrides the JOBLIB. Can someone explain why this is so?

+4
source share
3 answers

The following are excerpts from IBM manuals and explain what the Joblib DD statement does and how the Steplib DD statement interacts with the Joblib statement.

Use the JOBLIB DD statement to:

  • Create a private library.

  • Define the private library in which the system should search for the program specified in each PGM parameter of the EXEC statement in the job. Only if the system does not find the program in a private library, does it search the system libraries.

Communication STEPLIB with JOBLIB

Use the JOBLIB DD statement to determine the private library in which the system should be used for all work. If you include the JOBLIB DD statement for the job and the STEPLIB DD statement for the individual job step, the system first looks for the library of steps, and then the system library for the program requested in the EXEC statement. The system ignores the JOBLIB library for this step.

+6
source

In a word, no. For the final answer, you will have to find the original designers and ask them why; I doubt they remember half a century later. It was a constructive solution and, in principle, rationalization, like most of these reasons, probably, "at that time it was a good idea."

The documentation for JOBLIB and STEPLIB indicates that they serve the same purpose.

+3
source

Think about it by analogy. You know, when you write a program, how can you have a local variable with the same name as a global variable. Area definition rules for languages ​​go from specific to general.

Same thing with STEPLIB, which is specific at the job step level. Although JOBLIB is a generic, global definition. This allows a common definition or redefinition, which can change at every step. The transition to another path is too hard and not controlled.

Some will say, "well, someone from IBM just made a choice." No, I do not agree with this, IBM had good, reliable and rational solutions regarding how they designed the hardware and software for mainframes. And the ability to manage program libraries in a hierarchical order, from specific to general, is one of their many excellent options.

+1
source

Source: https://habr.com/ru/post/1490080/


All Articles