Page 1 of 1

File disposition overrides

PostPosted: Thu Apr 21, 2011 8:48 pm
by vinod_rana
Hi,

Can anyone please answer my below question?

Does file disposition in JCL override the file declared in cobol pgm.
E.g I give DISP=MOD in JCL but in program I give OPEN OUTPUT. In this case which one will be taken into account?

Thanks in advance

Re: File disposition overrides

PostPosted: Thu Apr 21, 2011 8:57 pm
by steve-myers
DISP=MOD in JCL probably overrides the Cobol OUTPUT option. An Assembler programmer can effectively reset DISP=MOD to DISP=OLD, though I've never done it and I've never heard of it being done. An Assembler programmer also has the EXTEND option in the Assembler OPEN macro to do sort of the equivalent of DISP=MOD. I don't know if there is a similar option in the Cobol OPEN verb.

Re: File disposition overrides

PostPosted: Thu Apr 21, 2011 9:40 pm
by vinod_rana
Thanks Steve!!!

Re: File disposition overrides

PostPosted: Fri Apr 22, 2011 12:37 am
by NicC
DISP=MOD is opening for output - just that the data being written will be tagged onto the end of any data already in the dataset.