What is the difference between Disp=MOD and Disp=OLD

8 posts / 0 new
Last post
What is the difference between Disp=MOD and Disp=OLD

Can someone please explain the difference between Disp=Mod and Disp=old

Joined: 08/08/2011 - 11:32
difference between disp=mod and disp=old
when u want to append data to file use disp=mod disp=old means exclusive control on the dataset
Joined: 07/07/2011 - 19:59
DISP=OLD also means that the file will be overwritten and the old data will disappear to be be replaced with new data. Disp=Mod means that new data will be added to the end of the file.
Joined: 09/04/2011 - 17:08
disp=old refers to dataset
disp=old refers to dataset already created. if it not there means it wil show error .. disp=mod refers some data contents are added at end of dataset if dataset already present . if the data set not present means a new dataset is created.
Better don´t use DISP=MOD

When you allocate a Data Set with DISP=MOD and the program produce a abend, you don´t knew if some Data is written to the Data Set or not.

It´s better you create a new Data Set and write on it.
After a successful completion of the Step, you copy the original DS to a new DS.
Then you copy this 2 new Data Sets concatenated (DISP=SHR) with DISP=OLD over the old original Data Set.
Now you can delete the 2 new Data Sets.

Joined: 12/26/2011 - 06:34

MOD is a perfectly good choice for certain requirements.

If you want to append to existing data, MOD will allow this.

If you have housekeeping JCL that terminates with FILE NOT FOUND, MOD may be able to prevent this. If MOD is used, a new file will be created if it does not exist. An existing file will be used when it already exists.

Suggest everyone in this topic read about MOD in the JCL Reference Manual.

Joined: 04/15/2013 - 16:52
difference between Disp=Mod and Disp=old

Both the options gives us status of the data-set ie dataset is already existed. In MOD is used to append the record at end and OLD is used while updated dataset with exclusive control over the dataset.


Joined: 12/26/2011 - 06:34
not the best answer . . .


Yes, MOD can be used to append, but it can also be used to create a new file.

Your info is incomplete at best.

Log in or register to post comments
Sponsored Listing