Disp = MOD

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Disp = MOD

Postby Vineet » Tue Aug 31, 2010 9:15 pm

Hi All,

I am having a Sequential File,Thru COBOL Pgm. I am Processing & writining Records To the File. If Job Abends then Records Should get written to the File & when I restart the Job from Abended Step, Records which are not processed
Should get Added to The File. For This I am Using Disp = (MOD,CATLG,CATLG). Please Confirm from COBOL side do I Need to Open the File in Extend Mode Or Output Mode will also work. My Understanding is EXTEND Mode. Please Confirm If I am wrong.

Kind Rgds
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: Disp = MOD

Postby steve-myers » Tue Aug 31, 2010 10:07 pm

"Extend" mode in OPEN is certainly an option for Assembler programmers; I don't know what its meaning is for Cobol. When an Assembler programmer specifies EXTEND as an OPEN option, it is equivalent to specifying DISP=MOD in JCL. I suspect it has the same meaning for Cobol, but I'm not a Cobol user.

It may not be a good idea. Many sites forbid the use of DISP=MOD for tape data sets, so if your data finds its way to tape your processing logic won't work. In addition, DISP=MOD is not allowed for data sets with the FBS or VBS record formats, which may be an issue in the future. Finally, if your data becomes a member of a PDS, DISP=MOD will not work the way you might expect; an attempt to use it will delete the original member without telling you.
Global moderator
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Disp = MOD

Postby dick scherrer » Tue Aug 31, 2010 11:48 pm


If you intend to MOD onto an existing file, you need to make a copy of the data before the MODding begins (each time a new set of data is to be appended).

If there is an abend, simply copy the backup over the damaged original file and restart the process from the beginning.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to JCL


  • Related topics
    Last post