JCL DISP Parameter

JCL DD Statement JCL DCB Parameter

Advertisements


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.

It is used to describe the status of the dataset that is coded with the DD statement.

It is also used to instruct the system what to do further based on the status of the dataset.

Syntax:

	
	DISP= [STATUS][, Normal-termination-disp][, abnormal-termination-disp]
DISP= ([NEW] [,DELETE ] [,DELETE ] ) [OLD] [,KEEP ] [,KEEP ] [SHR] [,PASS ] [,CATLG ] [MOD] [,CATLG ] [,UNCATLG] [, ] [,UNCATLG] [, ]

Let's discuss one by one.

STATUS:

STATUS parameter is used to specify the condition status of the dataset provided in JOB.

The attributes of the dispositional parameters are given below

	NEW 	-- 	Dataset doesn’t exist and will be created in the step. 
			Initialize new dataset t make sure that is empty.

	SHR 	-- 	Already existed dataset and is used for READ. 

	OLD 	-- 	Dataset already existed and the step needs exclusive access 
			for writing/reading. 
			
			Describes the OS that specified file already existed before 
			the step execution.

	MOD 	-- 	Already existed dataset and is used to append the data 
			at end of the file.   
				
			It will act as a NEW data set if data set not exists.
			 
			Then it will create a data set and append the data into 
			data set.
			
			If status parameter is ignored, the default value is NEW.

Normal-termination-disp:

Normal termination disp describes the system that what action needs to be performed on dataset when JOB step terminates normally.

Normal termination disp have the below list of values


	1. KEEP
	2. DELETE
	3. PASS
	4. CATLG
	5. UNCATLG
KEEP:

Inform to system that the dataset to be kept on the volume after step terminates successfully.

Keep will not alter any memory allocations done earlier for the dataset.

DELETE:

Inform to system that the dataset is no longer after step terminates successfully.

DELETE means making the memory available for other datasets usage.

PASS:

Inform to system that the dataset needs to pass to the subsequent steps in the same JOB after step terminates successfully.

Dataset can be passed within the JOB only.

CATLG:

Inform to system that the catalog entry needs to be placed after step terminates successfully.

Dataset is kept for CATLG entry if the step completed successfully.

UNCATLG:

Inform to system that uncatalog the dataset after step terminates successfully.

UNCATLG will do two tasks

	1. Removes entry in system or user catalog directory for dataset.
	2. All un needed indexes will be deleted.

UNCATLG will not remove data from the dataset which is un cataloged.

Abnormal-termination-disp:

abnormal termination disp describes the system that what action needs to be performed on dataset when JOB step terminates abnormally.

abnormal termination disp have the below list of values


	• KEEP
	• DELETE
	• CATLG
	• UNCATLG
KEEP:

Inform to system that the dataset to be kept on the volume after step terminates abnormally.

Keep will not alter any memory allocations done earlier for the dataset.

DELETE:

Inform to system that the dataset is no longer after step terminates abnormally.

DELETE means making the memory available for other datasets usage.

CATLG:

Inform to system that the catalog entry needs to be placed after step terminates abnormally.

Dataset is kept for CATLG entry if the step completed abnormally.

UNCATLG:

Inform to system that uncatalog the dataset after step terminates abnormally.

UNCATLG will do two tasks

	1. Removes entry in system or user catalog directory for dataset.
	2. All un needed indexes will be deleted.

UNCATLG will not remove data from the dataset which is un cataloged.


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


JCL DD Statement JCL DCB Parameter

Advertisements