JOBLIB and STEPLIB: Load Module Search Order
Understand how JOBLIB and STEPLIB direct the system's search for executable load modules and why their scope and precedence matter.
When JCL says EXEC PGM=SOMEPGM, the system has to find the actual load module named SOMEPGM somewhere — and JOBLIB and STEPLIB are the two DD statements that tell it where to look beyond the default system libraries. This is a foundational-but-often-misunderstood topic because the difference in scope between the two, and their interaction with dynamic CALLs, is exactly the kind of thing that causes 'works in test, fails in prod' library-resolution bugs.
JOBLIB is a company-wide employee directory checked for every meeting all day, while STEPLIB is a sticky note taped to one specific meeting room door overriding just that one meeting's contact list — and if both exist for the same meeting, everyone follows the sticky note, not the company directory.