Load module
The program in its runnable form, kept in a library. JCL runs it by name.
Also written program object, executable
Why it matters. Production runs load modules, not source. EXEC PGM=ZBINT01 finds the one with that name.
Syntax
//stepname EXEC PGM=program-name[,PARM='...'] //STEPLIB DD DSN=load.library,DISP=SHR
- PGM=
- The name of the load module to run.
- PARM=
- A text value passed to the program.
- STEPLIB
- A library searched first, for this step only.
- JOBLIB
- A library searched first, for every step of the job.
- REGION=
- How much memory the step may use.
Try it EXEC PGM=
- 1
Your link-edit wrote a load module. List the members of your DEV load library.
LISTDS 'ZB0001.DEV.LOAD' MEMBERS - 2
Submit the job RUNINT. It has one step: EXEC PGM=ZBINT01.
SUBMIT 'ZB0001.DEV.JCL(RUNINT)' - 3
Read the output of the job.
OUTPUT RUNINT
Remember
- A load module is what the link-edit makes.
- EXEC PGM=name runs the load module with that name.
- STEPLIB (or JOBLIB) tells the system which library to look in first. Without them it searches the system libraries.
The usual mistake
EXEC PGM=ZBINT1
One letter is missing. The system finds no load module with that name, and the step ends with S806.
EXEC PGM=ZBINT01
On real z/OS
A real load library is either a PDS (load modules) or a PDSE (program objects). MF/OS shows the usual attributes (RECFM U) but the member isn't real machine code. A missing module gives S806, as on z/OS.
Where can I practise Load module?
Right here, at ZedBank. You take a junior job at a simulated bank and use Load module in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- Link-editCombining compiled object code with the other modules it needs into a single runnable program.
- CompileTurning COBOL source code into machine instructions, checking the syntax and producing a listing of any errors.
- PDSEThe modern version of a partitioned dataset, which reclaims space automatically and removes the old size limits.
- EXEC statementThe JCL statement that starts a step by naming the program or procedure to run.
- Partitioned datasetA dataset that works like a library or folder, holding many separately named members inside one dataset.