JCL DD Statement

JCL EXEC COND JCL DISP Parameter

Advertisements


DD stands for Data Definition.

DD specifies the data set to be used in the JOB step.

DD also responsible to provide the specification about how to use of the data set.

DD statement is left justified.

DD statement should be coded in between 12th column to 15th column.

DD Statement has the dataset details.

Each EXEC statement will have its corresponding DD statements.

One DD statement required to specify one data set.

If more than one dataset needs to add step that many DD statements needs to be provided.

The DDname used in the program provided validate with the DDname in the DD statement.

DD statement contains the actual name of data set and its location

DD statement also contains the information about physical characteristics of the data set, such as record format

The initial and final status of the data set known as its disposition.

DD Statement will have the dataset details.

Each EXEC statement will have its corresponding DD statements.

Step names are unique in JCL.

Execution sequence will not depend on the step name.

Syntax:

	//ddname DD   positional-parameter[,keyword-parameter][comments]

DD statement can be divided into the below parts.

  • DDname
  • Operation
  • Positional parameters
  • Keyword parameters
  • comment

Let’s discuss one by one in detail.

DDname:

DDname is of length 8 characters.

Allows the combination alphabets, numbers, @, # and $.

DDname is mandatory with DD statement.

DDname provided in JCL should match with the file DDname declared in program.

DDname naming standards:

• The DDname must begin in column 3.

• The DDname of 8 characters length which allows alphabets (A-Z), numbers (0-9) and $, #, @ characters

• The first character must be alphabet, $, # and @.

• The DDname must be followed by at least one blank.

Operation:

Operation field describes about the type of operand.

Operation is nothing but DD.

Operation is of length 4 characters.

Starts from 12th character and continue up to 15th character.

Operation is optional with step if the processing program not using any input file.

Positional parameter field:

DD statement contains the positional parameters.

Positional parameters start at 17th column.

Positional parameters can end at any column between 17th to 72 columns.

Positional parameters are optional even though operation field is specified.

Positional parameters are 2 types.


	1. DUMMY
	2. DYNAM
	3. DSNAME/DSN
DUMMY:

DUMMY parameter specifies no space allocation.

DUMMY parameter also provides to the operating system that no disposition and no I/O.


Syntax:
	//DDname   DD   DUMMY

The above one is used to execute the program without any error if file allocation needed and no file really existed.

DYNAM:

DYNAM parameter to increase by one the control value for dynamically allocated resources held for reuse.

DYNAM parameter is used to provide the compatibility with older systems.


Syntax:
	//DDname   DD   DYNAM
DSNAME:

DSNAME specifies the name of the dataset.

DSNAME can specify the existing dataset or new dataset.

DSNAME required some additional keyword parameters like DISP, SPACE, DCB etc,.

Syntax:
	//DDname   DD   {DSNAME/DSN}=name
	
	name for permanent data set:
	
	     dsname
	     dsname(member)
	     dsname(generation)
	
	name for temporary data set:
	
	     &&dsname
	     &&dsname(member)
	
	name copied from earlier DD statement:
	
	     *.ddname
	     *.stepname.ddname
	     *.stepname.procstepname.ddname
	
	name for dummy data set:
	
	     NULLFILE

Keyword parameters:

DD statement used many keyword parameters.

Keyword parameters start immediately after positional parameters with separated by comma (,).

DD statement mainly used below keyword parameters.

	1. DISP
	2. DCB
	3. SPACE

Let's discuss one by one here.

DISP:

DISP parameter describes the status of the data set.

DISP stands for DISPOSITION of the Dataset.

DISP describes the system to perform keep or delete the data set after normal or abnormal termination of the step or job.

DISP parameter can be explained in detail here .

DCB:

DCB parameter used to create the dataset in JCL.

DCB mainly used to specify the attributes of the dataset. i.e. record length, record format, organization type etc.,

DCB specifies the attributes of the dataset in terms of records.

DCB parameter can be explained in detail here .

SPACE:

SPACE parameter used to request a space for New dataset.

SPACE parameter can also override space allocation for the dataset which is already created. In other words, it can extend the space allocation for the dataset already created.

SPACE parameter has no advantage of using it for TAPE devices.

SPACE parameter can be explained in detail here .

Comment:

Comment used to make a note of current statement.

Comment can be code in any column between 17th to 72 columns.

Types of DDNAMEs:

There are two types of DDNAMES existed in the system.

  1. User-defined DDnames
  2. System defined DDnames

User Defined DDnames:

These names referred the DDname used in program while the file creation.

These are used to connect the logical file in the program to physical file of JCL.

These DD name will act as a connector in between the program and JCL.

System defined DDnames:

System defined ddnames are used for a special purpose like where to specify the loadlib libraries, procedure libraries, copybook libraries etc.

System defined DDnames are

	1. STEPLIB
	2. JOBLIB
	3. PROCLIB
	4. JCLLIB
	5. COPYLIB

System defined DDnames explained in further chapters.


If any questions on the above, post your queries on Jcl Discussion forum


JCL EXEC COND JCL DISP Parameter

Advertisements