IMS status AI: Data management open error
IMS status code AI means IMS couldn't open one of the data sets the call needs. The reason is in message DFS0730I, which IMS writes at the same time.
Other names for this code
Also written as status code AI, IMS AI, DL/I status AI, AI status code, IMS open error.
What it means
IMS opens database data sets when they are first needed, which is often on the program's first call against that database. If the open fails, IMS can't run the call, so it returns AI in the database PCB. The call itself is usually fine. The problem is in the JCL, the data set, its catalog entry or the security around it.
Any database call can get AI, because any of them can be the first to touch a data set. That includes GSAM calls, which open their sequential data set on first use. IMS normally writes message DFS0730I with the DD name and a reason code that describes why the open failed. z/OS may write its own allocation or open messages next to it. Read those before changing the program.
AI is an error. The call didn't run, and the program shouldn't carry on as if it had.
Common causes
- A batch DL/I job is missing the DD statement for one of the database data sets, or the DD name doesn't match the name in the DBD.
- An online system or BMP relies on dynamic allocation, and the allocation member for the database is missing or names the wrong data set.
- The data set isn't cataloged, was renamed, or is on a volume that isn't available.
- RACF or another security product denies the job or the IMS region access to the data set.
- For GSAM, the input data set doesn't exist or isn't in the JCL when the program issues its first get call.
- The data set attributes don't match what the DBD expects, for example a different block or control interval size after someone redefined it.
How to find the problem
- Find DFS0730I in the job log, or on the IMS master console for an online system. Note the DD name and the reason code, and look up the reason code in IMS Messages and Codes.
- Look for z/OS messages near it, such as allocation failures or ICH408I security violations.
- Compare the DD names in the JCL with the DD names in the DBD.
- For an online database, use
/DISPLAY DATABASE dbnameto see whether it's stopped or not open, and check its dynamic allocation member.
How to fix it
- Add or correct the DD statement, or fix the dynamic allocation member, then rerun.
- Catalog the data set or point the JCL at the right name.
- Get the security administrator to grant the job or the IMS region access.
- Redefine the data set with the attributes the DBD expects, or reload it with your normal reorganization process.
IBM documentation
IBM documentation: status AI. Use the documentation for your installed release.
Related codes
Questions
Is the AI status a program bug?
Rarely. AI almost always comes from the JCL, allocation, catalog or security. The program just happened to be the first to touch the data set.
Which message tells me why the open failed?
DFS0730I. It names the DD and gives a reason code. z/OS messages written at the same time often add the detail.
Why does the job work in batch but get AI as a BMP?
A BMP uses the online system's allocation, not the DD statements in its own JCL. If the online system can't open the database, the BMP gets AI.