out put file I gave DISP=OLD and space abend.

All sort of Mainframes Interview Questions.
Post Reply
Sunita R
New Member
Posts: 9
Joined: Mon Jan 19, 2015 10:39 pm

out put file I gave DISP=OLD and space abend.

Post by Sunita R »

Recent interview question: one of out put file I gave DISP=OLD and it failed during run in time in production with space abend, how can you solve it?
Sunita R
New Member
Posts: 9
Joined: Mon Jan 19, 2015 10:39 pm

Re: out put file I gave DISP=OLD and space abend.

Post by Sunita R »

2. I have an existing VSAM file. It is required to add 1 new field. What are the steps to implement this change?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: out put file I gave DISP=OLD and space abend.

Post by Robert Sample »

DISP=OLD for output data sets (not files) means that the output is written from the beginning. So figure out how much space you need, change the JCL to include SPACE on the DD statements (which will override the defaults used by the data set), and rerun the job. However, if the data set has the maximum allowed extents, you will need to delete it and create it (hopefully with a larger SPACE).

Does the VSAM data set have any unused places to put the new field? If not, you will need to unload the VSAM data set into a sequential data set, delete and define the VSAM data set with the increased record length, and reload the VSAM data. If there is unused space within the record, you can use some of it for the new field in which case you merely have to start using that space for the field. In either case, if copy books are involved they will need to be updated appropriately. Programs will probably need to be recompiled to use the new copy books and field.
Sunita R
New Member
Posts: 9
Joined: Mon Jan 19, 2015 10:39 pm

Re: out put file I gave DISP=OLD and space abend.

Post by Sunita R »

DISP=OLD for output data sets (not files) means that the output is written from the beginning. So figure out how much space you need, change the JCL to include SPACE on the DD statements (which will override the defaults used by the data set), and rerun the job. However, if the data set has the maximum allowed extents, you will need to delete it and create it (hopefully with a larger SPACE).
Thanks.

But why mainframes system not take care about it itself? It's just space on a disk?

Also, please advise what you meant by 'not files'?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: out put file I gave DISP=OLD and space abend.

Post by Robert Sample »

The original S/360 machine was announced in April 1964, using the OS/360 operating system at that time. Back then, the programmer had to specify the complete characteristics of the data set including the space it needed. IBM is extremely big on backwards compatibility so those restrictions still exist today. Hence you have to determine how much space is required and allocate it yourself even today. On DOS/360, a variant of OS/360, you even had to specify where on the disk pack to place the data set (as in, cylinder and track and maybe even read/write head -- I don't recall if head had to be specified).

And "not files" means that mainframes use data sets, not files. Mainframe data sets have a structure that does not exist in files you see on Windows / Linux / Mac machines -- blocks and records -- which in turn implies there is no end-of-record or end-of-file markers in data sets. While using the term "file" for a mainframe data set is terminology that people understand, there are some times when it is incorrect to use the term.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”