IBM Support

AEIP and AEIM when function shipping file control requests

Troubleshooting


Problem

You are trying to develop an XFCREQ exit to transform all add, update, and delete requests into function ship requests. The requests are being shipped to the CICS file owning region (FOR). However, you receive an AEIM abend due to a not found (NOTFND) condition when attempting to update or delete a record. And, you receive an AEIP abend due to an invalid request (INVREQ) condition when trying to add a record.

Symptom

You verified both the application owning region (AOR) and FOR are pointing to the same dsname. You have installed the same application (running the same code) in the FOR, and everything works when run locally in the FOR. The application programs are VS COBOL II.

Cause

KEYLENGTH was not specified on the EXEC CICS commands so it was defaulting to 4 as documented under File definition attributes in the CICS Transaction Server for z/OS (CICS TS) information center:

Specifies the length in bytes of the logical key of records in remote files, and in coupling facility data tables that are specified with LOAD(NO).

If KEYLENGTH is not defined here, the KEYLENGTH option must be specified on file control commands in the application programs that refer to this file. If KEYLENGTH is not defined here and is not specified in the application program, and the key is longer than 4 characters, the default value is 4.

Resolving The Problem

Specify KEYLENGTH with SYSID on the file control commands in the application program. For example, on the EXEC CICS WRITE command.

Alternatively, you could have two File definitions in your AOR instead of modifying the parmlist in your program. A local read-only definition and a remote updatable definition with the first character of the file-id changed to something like an 'X'. You would specify the KEYLENGTH in the remote definition. This is much easier to code for in the exit, and does not entail making any changes to the parmlist except to change FC_ADDR1 so that it points to the new (remote) file-id for adds, deletes, and so on.

Note: The reason that the exit was being used to function ship the add, update, and delete requests was because shareoptions 2,3 was specified. In this case, only one CICS region can have a file open for update and many CICS regions can have the file open for read only. This is useful if a file has a lot of read activity.

[{"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"File Control","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"4.2;4.1;3.2;3.1","Edition":"","Line of Business":{"code":"LOB70","label":"Z TPS"}}]

Product Synonym

CICS/TS CICS TS CICS Transaction Server

Document Information

Modified date:
05 January 2026

UID

swg21024112