IKJ56225I: Data set already in use, try later
IKJ56225I means your TSO allocation failed because another job or TSO user already holds the data set, and their use conflicts with yours. Usually one side wants exclusive use (DISP=OLD, NEW or MOD) while the other has it allocated.
Other names for this code
Also written as IKJ56225I ALREADY IN USE, TRY LATER, IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER, IKJ56225, data set already in use try later, TSO data set in use.
What it means
z/OS protects each data set with an enqueue on its name. A job or user that has a data set with DISP=SHR holds a shared enqueue, and others can share it. One that has it with DISP=OLD, NEW or MOD holds an exclusive enqueue, and nobody else can get it at all. TSO allocations don't wait for an enqueue to be released. If yours conflicts, dynamic allocation fails at once with error code 0210, and TSO writes IKJ56225I.
The first line names the data set and ends with a plus sign. The second-level line, DATA SET IS ALLOCATED TO ANOTHER JOB OR USER, confirms the reason. Type a question mark at the READY prompt to see it if it isn't shown.
The enqueue belongs to whoever allocated the data set, and it lasts until they free it or their job or session ends. A batch job that has the data set as DISP=OLD holds it for the whole job unless the system releases it earlier, and a TSO user holds an allocation until they FREE it or log off.
Common causes
- A batch job is running with the data set allocated DISP=OLD, NEW or MOD.
- Another TSO user allocated it with OLD, for example through a CLIST, a REXX exec or a product that allocates OLD by default and never frees it.
- You asked for exclusive use (OLD) when you only need to read it, while someone else has it shared.
- A started task or long-running region, such as a CICS region, keeps the data set allocated.
- A job or session that used the data set has hung or is waiting, so it hasn't released it.
How to find the problem
- Under ISPF, run
TSO ISRDDNand use its ENQ command with the data set name to see who holds the enqueue. - Ask operations, or use SDSF if you are allowed, to issue
D GRS,. It lists the jobs or users that own or wait for the data set.RES=(SYSDSN, PROD. PAYROLL. MASTER) - Check your own command or exec. If it allocates OLD, ask whether SHR would do.
- Check the schedule for batch jobs that update the data set.
How to fix it
- Ask for shared access when you only read the data set, for example
ALLOC FI(PAYIN) DA('PROD..PAYROLL. MASTER') SHR REUSE - Wait for the holding job to finish, then retry, as the message says.
- Ask the other user to free it with
FREE DATASET('PROD.or to log off if the session is idle.PAYROLL. MASTER') - Change execs and CLISTs that allocate OLD so they use SHR where possible and FREE the data set when done.
- If a hung job or session holds it, ask operations to deal with that job. Don't cancel other people's work yourself.
What it looks like
IKJ56225I DATA SET PROD.PAYROLL.MASTER ALREADY IN USE, TRY LATER+ IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER
IBM documentation
IBM z/OS documentation. Use the documentation for your installed release.
This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.
Related codes
Questions
Why can I browse the data set in ISPF but not allocate it?
Browse asks for shared access. Your allocation probably asked for OLD, which needs exclusive use. Allocate it SHR instead if you only read it.
How do I find who has my data set?
Use the ENQ command in ISRDDN under ISPF, or ask operations to run D GRS,RES=(SYSDSN,dsname). Both list the holders.
Does IKJ56225I mean the data set is damaged?
No. It only means someone else holds it in a way that conflicts with your request.