IKJ56247I: File not freed, is not allocated
IKJ56247I means a TSO FREE (or another request through dynamic allocation) named a file or data set that wasn't allocated, so there was nothing to free. In most cases it is harmless, because CLISTs and REXX execs often free a ddname before allocating it.
Other names for this code
Also written as IKJ56247I FILE NOT FREED, IS NOT ALLOCATED, IKJ56247I NOT FREED, IKJ56247, file not freed is not allocated, TSO FREE not allocated.
What it means
In TSO, a file is a ddname, such as SYSPROC or PAYIN, and it is tied to one or more data sets by an allocation. The FREE command removes that allocation. If you ask TSO to free a file or data set that has no allocation in your session, dynamic allocation can't find it, and TSO writes IKJ56247I. The usual form is IKJ56247I FILE ddname NOT FREED, IS NOT ALLOCATED. A DATA SET form names a data set instead of a file.
Nothing is damaged. The free simply had nothing to do. The message is common because many execs start with a FREE to clear out any old allocation before making a fresh one. The first time such an exec runs in a session, nothing is allocated yet, and IKJ56247I appears.
The same message number covers a few related cases. Some products print versions that say an information request wasn't performed because the file or data set isn't allocated. IBM groups the message with the DAIRFAIL and GNRLFAIL dynamic allocation failure messages.
Common causes
- A CLIST or REXX exec frees a ddname before allocating it, and the ddname wasn't allocated yet. This is the most common case and is harmless.
- An exec frees the same file twice, for example in a clean-up routine that runs after an earlier FREE.
- A typo in the ddname or data set name on the FREE command.
- A product ran a FREE for files it expected to exist but never allocated in this session. Vendors have fixed several of these by switching messages off around the FREE.
How to find the problem
- Note the ddname or data set name in the message.
- Type
LISTALC STATUSat the READY prompt, or useTSO ISRDDNunder ISPF, to see what is allocated in your session. - If the message comes from an exec, look for a FREE of that name near the start or end of it.
- If the message appears together with a real failure, look at the messages around it. IKJ56247I is rarely the cause of the problem.
How to fix it
- In a CLIST, code
CONTROL NOMSGbefore the FREE so the message is suppressed, and switch messages back on after it if you need them. - In REXX, turn messages off with
x = MSG('OFF')before the FREE and back on withx = MSG('ON')after it. - Or check first. In REXX,
LISTDSI('PAYIN' 'FILE')returns 0 when the ddname is allocated, so you can free it only then. - Correct the ddname or data set name if it was mistyped.
- If a vendor product prints it on every run, check with the vendor for a fix. It is usually a cosmetic problem.
What it looks like
IKJ56247I FILE PAYIN NOT FREED, IS NOT ALLOCATED
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
Can I ignore IKJ56247I?
Usually yes. It only says there was nothing to free. Check it only when a later step fails because a file it needed wasn't allocated.
How do I stop IKJ56247I appearing in my REXX exec?
Turn messages off around the FREE with MSG('OFF') and MSG('ON'), or check with LISTDSI that the file is allocated before you free it.
Why does the message appear only the first time I run my exec?
The exec frees the file before allocating it. On the first run nothing is allocated yet. On later runs the earlier allocation is still there, so the FREE works.