Explain the difference between a JOB statement and a EXEC statement in JCL and provide an example of each.

1 Answers
Answered by suresh

Difference Between JOB and EXEC Statements in JCL

Focusing on JOB vs. EXEC Statements in JCL

Focus Keyword: JOB statement vs. EXEC statement in JCL

Job Statement in JCL:

The JOB statement is used to define the start of a job in JCL. It specifies information about a JOB such as the job identifier, accounting information, and job processing options.

Example of a JOB statement:


//JOBNAME JOB ACCOUNT(A123),CLASS=A,MSGCLASS=H

EXEC Statement in JCL:

The EXEC statement is used to specify which program or procedure is to be executed within a job step. It identifies the program name or procedure name to be executed.

Example of an EXEC statement:


//STEP1 EXEC PGM=PROG1

Understanding the difference between the JOB and EXEC statements in JCL is crucial for effective job control language programming.

Answer for Question: Explain the difference between a JOB statement and a EXEC statement in JCL and provide an example of each.