Data Entry Database Resource Name hash routine (DBFLHSH0)
The IMS DEDB Resource Name hash routine is used with the Internal Resource Lock Manager (IRLM) and enables IMS and DBCTL to maintain and retrieve information about the control intervals (CIs) used by sharing subsystems.
Subsections:
About this routine
The routine performs a hashing function on the high-order three bytes of the relative byte address (RBA) representing a CI and uses the hashing result as a displacement into the hash table. If you are using IRLM in your system, the routine IMS supplies (DBFLHSH0) or the replacement routine that you write yourself is called automatically.
You can write the routine and bind it as reentrant (RENT) like the one supplied by IMS. It receives control and must return control in 31-bit addressing mode. It must be able to execute in cross-memory and TASK modes.
Attributes of the routine
The following table shows the attributes of the Data Entry Database Resource Name Hash routine.
| Attribute | Description |
|---|---|
| IMS environments | DB/DC, DBCTL |
| Naming convention | You must name this exit routine DBFLHSH0. |
| Binding | After you compile and test the routine, bind it into IMS.SDFSRESL or to the library specified in the USERLIB= parameter of the IMSGEN macro statement. |
| Including the routine | At system definition
time, you must specify the name of your routine in the UHASH parameter
of the DBC, FDR, or IMS procedure. Related Reading: For details, see the topic on the UHASH and the above procedures in IMS Version 15.2 System Definition. |
| IMS callable services | This exit is not eligible to use IMS callable services. |
| Sample routine location | IMS.SDFSSMPL (member name DBFLHSH0) |
Assembling the routine
In a multiple-IMS environment, all IMS systems must use the same hashing routine and compile that routine at the same time. If you write your own routine, you must store the compile time in the module using &SYSDATE and &SYSTIME. You also must place the address of the date and time in the first field of the routine's CSECT.
Communicating with IMS
IMS uses the entry registers and parameter list, and the exit registers to communicate with the routine.
Contents of registers on entry
| Register | Contents |
|---|---|
| 1 | Address of Extended Partition Specification Table (EPST). |
| 13 | Address of save area. The routine must not change the first three words. |
| 14 | Return address to IMS. |
| 15 | Entry point of hash routine. |
Description of parameters
As input to the hashing routine, you need to supply one of the following:
- the high-order byte of an RBA.
- the names of both a database and an area.
The routine performs an EXCLUSIVELY OR on this input, stores it in a field, and returns a hash value result to the field EPSTRSHS.
EPST (Extended Program Specification Table) input to the routine
| Field name | Content | |
|---|---|---|
| EPSTRSHS | Hashing routine result. Only the low-order 14 bits are significant. | |
| EPSTRSID | Start of the
lock name to be hashed. Lock resource name consists the following
are shown in the following list:
|
|

EPST DSECT
The DSECT of the extended program specification table (EPST) (name: DBFEPST), and the DEDB area control list (DMAC) (name: DBFDMAC) can be used. The DMAC address is set at the EPSTDMAA field.