Use this system macro to hash a resource name to obtain one or more of the
following:
- Ordinal number of the node control block (NCB) directory record for the
resource name
- Address of the resource name hash prime table (RNHPT) entry for the
resource name.
Format
Notes:
- Required if LUNAME=R1.
- label
- A symbolic name can be assigned to the macro statement.
- LUNAME=Rv
- A register (R1 through R7, or R14) that contains the address of a 16-byte
resource name to hash.
- HASHSLOT=Rw
- A register (R1 through R7, or R14) that receives the ordinal number of the
NCB directory record.
- RNHPTADR=Rx
- A register (R1 through R7, or R14) that receives the address of the RNHPT
entry.
- PRIME
- A register that points to the fullword that contains the prime hash
number.
- NO
- Use the largest prime number that is less than the value specified for the
MAXPRIM parameter in the SNAKEY macro, which is the number of RNHPT entries
defined in the TPF system. This is the default.
- Note:
- Use the default value when you specify the RNHPTADR parameter.
- Ry
- A register (R2 through R7) that contains the address of the prime hash
number.
- Note:
- If you specified the RNHPTADR parameter, the prime hash number cannot be
greater than the largest prime number that is less than the value specified
for the MAXPRIM parameter in the SNAKEY macro.
- WORKREG
- A register to preserve R1 across calls to the DHASHC macro. This
parameter must be coded if LUNAME=R1 is specified.
- NO
- R1 is not preserved across calls to the DHASHC macro. This is the
default.
- Rz
- A register (R2 through R7) that preserves R1 across calls to the DHASHC
macro.
Entry Requirements
R9 must contain the address of the requesting ECB.
Return Conditions
- Control is returned to the next sequential instruction (NSI).
- R15 contains a return code, which indicates the following:
- 0
- Successful call.
- 4
- Value specified for the LUNAME parameter was not valid. The value
cannot be all blanks or X'FFFFFFFFFFFFFFFF'.
- 8
- Hash value specified is greater than the allowed maximum value, which is
the largest prime number that is less than the value specified for the MAXPRIM
parameter in the SNAKEY macro.
- Note:
- This condition can be returned only when you specify the RNHPTADR
parameter. There is no maximum hash value defined for the HASHSLOT
parameter.
Programming Considerations
- This macro can be run on any I-stream.
- On return, the contents of R0 and R1 are destroyed and R15 contains the
return code.
- Note:
- R1 is preserved if you specify the WORKREG parameter.
- The DHASHC macro does not verify that the specified resource actually
exists. It simply returns the ordinal number of the NCB directory
record or the address of the RNHPT entry for the resource, regardless of
whether the resource exists or not.
Examples
None.