Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
The manual states that an EIBRESP2 of 26 is -
"The KEYLENGTH option is specified (but the GENERIC option is not specified), and the specified length does not equal the length defined for the data set to which this file refers.".
With that, determine the keylength defined to the Cluster (via a LISTCAT).
Once you have the keylength, specify this value in the STARTBR.
In CICS, issue a CEMT INQ FIL and determine whether this FILE is local or remote to your CICS region (look for REM in the CEMT display).
IMHO, it's always a good idea to specify the KEYLENGTH in the API, regardless whether the FILE is LOCAL or REMOTE.
If the FILE is REMOTE and the FCT entry does not specify KEYLENGTH, an INVREQ will be raised when it is not specified in the API as this is required for Function Shipping (IE: Remote File access) to the Remote region, where the FILE lives.
So, there's no harm done using the KEYLENGTH, unless of course, there's a problem with the KEYLENGTH definition in the CLUSTER itself and/or the KEYLENGTH value derived programmatically is incorrect.
You can also experiment with CECI (non-Production).
Thanks Bill for your input and sorry for late update.
The file is remote to CICS region and we are not using KEYLENGTH option however the problem got resolved.
The reason for error was that the local entry of file in local CICS region was defined with Keylength and recordsize as zero while the remote entry has the correct keylength and recordsize. So we have corrected the keylength and recordsize in local definition and it is working fine now.