I am trying create a +1 generation of a GDG but i am unable to create it, as (-0) generation of the GDG is in use by some other job. Is there a way by which i can create +1 generation on the same time when -0 is being blocked by some other job?
Joined: 06 Jun 2008 Posts: 8280 Location: Dubuque, Iowa, USA
The GDG base is required to be accessed exclusively when creating a new generation. This is the way the operating system works and you cannot get around this restriction. In other words, there is no way you can create a +1 generation when another job or user is using the GDG.
One of related things which i read on internet....Might be useful
"I have seen problems with DFHSM locking out production batch when that batch job was trying to create a +1 GDG. By default, HSM will ENQ on the base GDG catalog entry while migrating an individual file. This means if a batch job comes along and wants to create a (+1) version then that job is locked out until the migration is complete as it cannot update the catalog. It is common these days to see very big GDG files; 3-4000 cylinders is not unusual, and those migrates can take half an hour or more. There appears to be three options to fix this; just wait for the catalog to free up, set problem GDGs to never migrate or ask your developers not to create big files. None of these options are really acceptable.
There is another solution, which is to apply an HSM fix to change it so it just ENQs on the one file that it is migrating. To do this you apply the following patch, but read the caveat below first
{0 if enqueing is desired (default) 1 if no enqueing is desired}
Caveat; if you do not ENQ on the base, and if HSM is migrating the oldest GDG at the same time a batch job is creating a (+1) version, then the job will get an IEC331I 042-006 error. This is because DFP needs to delete the oldest GDG and it cannot because the file is in use. The batch job will actually complete fine (assuming it gets no other errors), but the problem is that it leaves an orphaned file behind it that will never be cleaned up automatically. Eventually the GDG number will roll around and catch up again and a create will fail, so the best bet is to get automation to trap this message and raise a problem ticket.
The choice is yours, you can live with contention issues, or you can cope with having to manually clean up files from time to time."