IMS status AM: Call not allowed by processing options
IMS status code AM means the call isn't allowed for this PCB. The usual reason is that the PCB's processing options (PROCOPT) don't permit it, for example a REPL, ISRT or DLET through a PCB defined for read only.
Other names for this code
Also written as status code AM, IMS AM, DL/I status AM, AM status code, PROCOPT error IMS.
What it means
Each database PCB in a PSB has a PROCOPT that says what the program may do through it. G allows get calls, I allows inserts, R allows replaces, D allows deletes, and A allows all of them. A SENSEG statement can set its own PROCOPT for one segment type, and that overrides the PCB-level value for that segment. When a program issues a call the options don't allow, IMS rejects it with AM and doesn't touch the database.
AM usually comes back on ISRT, REPL or DLET, since those are the calls most often restricted. It also shows up in two special cases. A PCB with PROCOPT=L is in load mode, and only ISRT calls are allowed through it, so a get call there gets AM. A GSAM PCB is set up for input or for output by its PROCOPT, so an ISRT through a GSAM PCB defined for input gets AM.
AM is an error. It means the program and its PSB disagree about what the program is supposed to do.
Common causes
- The PCB is read-only (PROCOPT=G) and the program issues REPL, ISRT or DLET through it.
- The PCB allows some updates but not the one used. A PCB with PROCOPT=GR allows replaces but not inserts or deletes, for example.
- A SENSEG statement gives that one segment a narrower PROCOPT than the PCB, so updates work on other segments but not this one.
- A load program's PCB has PROCOPT=L or LS, and the program issues something other than ISRT.
- The program issues ISRT through a GSAM PCB defined for input.
- The program uses the wrong PCB. With the PCB order out of step with the PSB, an update meant for an update PCB reaches a read-only one.
How to find the problem
- Note the function code and the PCB the call used. In a dump or debugger, the first 8 bytes of a database PCB hold the DBD name.
- Find that PCB in the PSB source and read its PROCOPT, then check the SENSEG statement for the segment the call touched.
- Make sure the online system uses the latest ACB for the PSB. A PSB changed in source but not regenerated still has the old options.
- Compare the PCB order in the program's entry statement with the PSB.
How to fix it
- Change the PROCOPT on the PCB, or on the SENSEG, to allow the call. Then run PSBGEN, and ACBGEN for online use, and make the new ACB active.
- If the program shouldn't be updating, remove the call, or route updates through a PCB defined for them.
- In a load program, use only ISRT through the load PCB.
- Fix the PCB order in the entry statement if the call went to the wrong PCB.
IBM documentation
IBM documentation: status AM. Use the documentation for your installed release.
Related codes
Questions
Does a SENSEG PROCOPT override the PCB PROCOPT?
Yes. For that segment type, the SENSEG value applies instead of the PCB value. That's how a PCB can allow updates to some segments and not others.
I changed the PSB but still get AM online. Why?
Online IMS uses the ACB, not the PSB source. Run ACBGEN and make the new ACB active as your shop does.
Which PROCOPT do I need for REPL?
R, or A, which includes it. ISRT needs I and DLET needs D.