Page 1 of 1

Question on DISP=(NEW,...)

Posted: Fri May 22, 2015 5:02 pm
by Perumal r
I was also asked if the DISP=(NEW,...) (he did not mention about the other DISP parameters) when the "memory" is allocated to dataset?

To this I asked, did you mean memory or storage? He was not sure but he insisted that I answer his question.

I said, if a COBOL program has a dataset allocated with DISP=(NEW,..) and the WRITE is not yet issued in the program, the storage is not allocated. But this confuses me more. If you have a better answer, please do share.

Re: Question on DISP=(NEW,...)

Posted: Fri May 22, 2015 6:07 pm
by Robert Sample
Buffers are allocated in memory when the data set is opened, no matter what the DISP is in the JCL. Disk space will be allocated when the job step execution starts.

Re: Question on DISP=(NEW,...)

Posted: Fri May 22, 2015 6:23 pm
by William Collins
It seems your interviewer just has a list of questions, at least some of which they don't understand. At least you are no worse off than others they "interview".