File control RLS coexistence program exit XFCRLSCO
The XFCRLSCO exit can be called during a request to open a file. Use this exit to allow an application to switch the mode between RLS and read-only non-RLS to access a particular data set.
CICS does not allow an open request to take place for a non-RLS file if an RLS file is already open against the same data set, or if the data set has outstanding RLS work in the system. Also, CICS does not allow an open request to take place for an RLS file if an existing non-RLS file is already open against the base data set. In these situations, if an open request occurs and the non-RLS file is open for read-only access, the XFCRLSCO exit is driven. You can use this exit to decide whether to allow the open request to proceed or to fail in the usual manner with message DFHFC0511 or DFHFC0512.
To switch the access mode, the application can open the data set using a new file with a different access mode. Do not keep the same data set open using both access methods simultaneously over an extended period of time, because CICS does not receive a consistent view of the data set when accessing it concurrently using both RLS and non-RLS files. In particular, CICS cannot get a consistent view if the data set is being updated by the RLS file at the same time as it is being read by the non-RLS file.
If VSAM upgrade set processing occurs while the data set is open using both RLS and non-RLS files, there is an increased risk that read errors might occur because the upgrade processing has not completed on either the base cluster or the associated alternate indexes.
- The exit is not driven if the non-RLS file has any updatable SERVREQS set (that is, it allows updates, adds, or deletes).
- The data set being opened must specify share options SHAREOPTION(2) on the VSAM base cluster. If lower share options are specified, VSAM fails the second open.
- If static allocation is being used then be sure to specify DISP=SHR, otherwise VSAM fails the open.
- When invoked
- During a file OPEN request, before the open request is issued to VSAM.
- Exit-specific parameters
-
- UEPFILEN
- Address of an 8-byte field containing the file name. If the file name is less than 8 characters in length, it is padded with blanks.
- UEPDSNAME
- Address of a 44-byte field containing the base data set name. If the data set name is less than 44 characters in length, it is padded with blanks.
- UEPFSERV
- Address of a 1-byte field containing the file SERVREQ indicator.
Possible values are:
- UEPFRDIM
- Read valid indicator.
- UEPFUPDIM
- Update valid indicator.
- UEPFADDIM
- Add valid indicator.
- UEPFDELIM
- Delete valid indicator.
- UEPFBRZIM
- Browse valid indicator.
- UEPFDSACC
- Address of a 1-byte field containing the file access method flag.
Possible values are:
- UEPFVSAM
- VSAM file indicator.
- UEPFDTBL
- Data table file indicator.
- UEPFDTUM
- User data table file indicator.
- UEPFRLS
- RLS file indicator.
- UEPFCFDT
- CFDT file indicator.
- UEPRECUR
- Address of the halfword recursion level.
- Return codes
-
- UERCNORM
- Continue processing as normal. The open request fails.
- UERCBYP
- Allow the open to take place, and bypass the coexistence failure.
- XPI calls
- You can use XPI commands, but the commands must not result in any state changes to any files.
- API and SPI calls
- You can use EXEC CICS API and SPI commands, but the commands must not make any state changes to any files. For example, you can use EXEC CICS INQUIRE FILE, but not EXEC CICS SET FILE, or EXEC CICS API commands against file control which result in state changes to any files.