Posted: Wed Mar 18, 2009 5:50 pm Post subject: Trying to delete/define a VSAm, but VSAM is in use
I've just a little problem with a VSAM.
I have a job that runs daily that tries to delete a VSAM, re-define it and then to do a repro.
Sometimes this job goes bad. The reason is that the delete statement fails because the "dataset is allocated to another job or user".
How can I tell with my jcl to wait until the dataset is free for the delete action?
I was thinking to use a repro with a dummy file before the delete/define actions but i don't know how to do it without deleting any record (I mean: I want to add a dummy file to the content of my VSAM, is it possible?) Doing so I think that my job will wait till the VSAM is free and in few seconds it will be deleted and re-defined.
Sorry for my bad english and thanks in advance for any suggestion
the fact that he lied
and did not own up to the fact that
when the delete step fails, the define will also,
we will attribute that to inexperience.
probably a disp=old in the repro step will create the necessary exclusivity, but I would have thought that disp=old on the dd statement of the idcams delete step would work,
but I am a little anal and do things up front. _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum