File disposition overrides



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

File disposition overrides

Postby vinod_rana » Thu Apr 21, 2011 8:48 pm

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
vinod_rana
 
Posts: 8
Joined: Thu Apr 21, 2011 12:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: File disposition overrides

Postby steve-myers » Thu Apr 21, 2011 8:57 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: File disposition overrides

Postby vinod_rana » Thu Apr 21, 2011 9:40 pm

Thanks Steve!!!
vinod_rana
 
Posts: 8
Joined: Thu Apr 21, 2011 12:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: File disposition overrides

Postby NicC » Fri Apr 22, 2011 12:37 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post