Page 1 of 2

VSAM file is allocated to another job or user

PostPosted: Mon Dec 07, 2009 6:41 pm
by jitender_2004bhiwani
Hi,

Whenever i am trying to edit a VSAM file through fileaid, i am getting the error file is already in use, please try later.
Is there any way to find out which job or user is holding the file?

Thanks,
Jitender

Re: VSAM file is allocated to another job or user

PostPosted: Mon Dec 07, 2009 6:45 pm
by MrSpock
Master Console command:

D GRS,RES=(*,&DSN)

Re: VSAM file is allocated to another job or user

PostPosted: Tue Dec 08, 2009 1:26 am
by dick scherrer
Hello,

When you get the "in use" message, try pressing F1 two times.

Re: VSAM file is allocated to another job or user

PostPosted: Tue Dec 08, 2009 8:29 am
by jitender_2004bhiwani
Dick,

Pressing F1 two times doesn't work for me. It just gives the message that file is allocated to another job or user.

MrSpock,
Can you please tell me how to use this command and where.

Thanks,
Jitender Singh

Re: VSAM file is allocated to another job or user

PostPosted: Tue Dec 08, 2009 11:13 am
by dick scherrer
Hello,

Yup, i wasn't sure about the 2 F1s in fileaid (works well in tso/ispf). . . Bummer.

As Mr Spock mentioned "D GRS,RES=(*,&DSN)" is a console command. On many systems, these commands are not available to developers.

Re: VSAM file is allocated to another job or user

PostPosted: Mon Jun 14, 2010 2:00 pm
by kashmiri
You can also use "TSO WHOHAS <Vsam File Name>" in ISPF

Re: VSAM file is allocated to another job or user

PostPosted: Mon Jun 14, 2010 11:44 pm
by dick scherrer
Hello,

WHOHAS is site-specific and is not available on every system. . .

Re: VSAM file is allocated to another job or user

PostPosted: Fri Jul 09, 2010 4:05 pm
by cvrupesh
I have a JCL which does the rename for a flat file using IDCAMS.

The JCL Looks as below:

//ZZ25TEST JOB 1,'RENAME',MSGCLASS=2,CLASS=Y,NOTIFY=&SYSUID
//*==============================================================
//*%%R S=RENAME1 P=IDCAMS R=*
//*%%C RENAME THE FILE FROM READY TO COMPLETE
//*==============================================================
//*
//RENAME1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALTER ZZ25.READY -
NEWNAME (ZZ25.COMPLETE)
//*

This job failed couple of times with the error message:
IDC3028I DATA SET IN USE
IDC3009I ** VSAM CATALOG RETURN CODE IS 184 - REASON CODE IS IGG0CLEC-4

I saw in IBM Support site a post which is very much similar to my problem:
http://www-01.ibm.com/support/docview.w ... g3T1010350
I am not able to understand the post in IBM Website.

I am sure that my dataset was not opened any where even then the failure message says" DATASET IN USE".

Can someone help me in overcoming this failure message?

Thanks for your help.
-Rupesh.

Re: VSAM file is allocated to another job or user

PostPosted: Fri Jul 09, 2010 6:17 pm
by steve-myers
Wow!

I don't think the IBM reference you found has anything to do with your immediate problem. It describes an issue with VSAM data sets, but you are trying to rename what you claim is a non-VSAM data set.

I'll try to cut through some of the terminology in the IBM reference.

MIM (also known as CA-MIM) is a fairly popular alternative to the IBM GRS function. MIM appeared years before GRS, and most sites that used MIM kept on using it rather than convert to GRS. Converting from MIM to GRS was difficult in the early days of GRS, and there were quite a few difficulties with GRS early on that caused many sites to not use GRS. MIM provides more capability than GRS in many respects, which is another reason that it is still widely used If I read the IBM document correctly, there is a known issue with MIM, corrected by a CA PTF to MIM, that will correct the MIM problem, which, in any event, doesn't appear to have anything to do with your problem. The IBM reference discusses a method to work around the MIM problem.

Many sites have WHOHAS, so you might try it. I believe it is readily available through CBT (www.cbttape.org). I do not believe it is difficult to install, but finding it is non-trivial.

Re: VSAM file is allocated to another job or user

PostPosted: Sat Jul 10, 2010 12:11 am
by dick scherrer
Hello,

I am sure that my dataset was not opened any where even then the failure message says" DATASET IN USE".
Neither dataset name may be in use. . .

Suggest you create a new file of a completely different name and then run the ALTER. If this works, one of the original names must have somehow been in use.