Sunday, 28 July 2013

EXEC | EXEC Statement | EXEC Statement in JCL | JCL EXEC Statement | EXEC Tutorial

JCL EXEC Statement.
EXEC Statement.

In this tutorial, I'll discuss EXEC or EXEC Statement. Also, discuss various keyword parameter which is required while using the EXEC statement. So, let's start with the JCL EXEC Statement tutorial. 

What are the EXEC Statements?

Begin each job step with an EXEC statements that either names the program to execute (compiler, linkage editor, application program, utility and so on) or invokes a cataloged procedure. A job can contain several EXEC statements. 

A catalog procedure may also contain several EXEC statement naming a program to execute. There may be as 255 EXEC statements (job steps) in a job, each followed by DD statements defining the data sets required by the job step. The general form of the EXEC statements is as follows. 

                                     procedure
                    PGM=program
                    PGM=*.referback

   //stepname EXEC _____________________, keyword-parameter


The STEPNAME is the name you choose for the job steps. The keyword-parameter are the following:

EXEC Statement Essential parameters.

1.     COND       specifies the condition for executing job steps if previous steps fail.
2.     PARM       passes the parameter to a job step.
3.     REGION  specifies the region size to allocate to job steps.


STEP NAME: Name of the step.

//stepname EXEC names the job step. The step name is optional one to eight alphanumeric (A to Z, 0 to 9) or national (@ $ #) character name you select. It must begin in column 3 with alphanumeric or national character.
//STEP10        EXEC
//COMPUT        EXEC
//(GO           EXEC   Wrong! first character not alphabetic.

PGM: Name of program.

//stepname EXEC PGM=program names the program to execute. 

Programs can reside in a system library named SYS1.LINLIB, in temporary libraries, and private libraries. A program is a load module and must be a member of a particular partitioned data set on a direct-access volume.

If the program name cannot be found in the libraries, the system abnormally terminates the job with an 806 compilation that is then listed with system messages in your printed output.


No comments:

Post a comment