### NDF_XLOC

#### Description:

The routine returns an HDS locator to a named extension (if present) in an NDF. An error results if the specified extension is not present.

#### Invocation

CALL NDF_XLOC( INDF, XNAME, MODE, LOC, STATUS )

#### Arguments

NDF identifier.
##### XNAME = CHARACTER $\ast$ ( $\ast$ ) (Given)
Name of the required extension.
##### MODE = CHARACTER $\ast$ ( $\ast$ ) (Given)
Mode of access required to the extension: ’READ’, ’UPDATE’ or ’WRITE’.
##### LOC = CHARACTER $\ast$ ( $\ast$ ) (Returned)
Extension locator.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Notes:

• If WRITE access is specified, then any existing extension contents or values will be erased or reset, so that the extension is ready to receive new values. If UPDATE access is specified, then existing values will be retained so that they may be modified.

• It is the caller’s responsibility to annul the HDS locator issued by this routine (e.g. by calling DAT_ANNUL) when it is no longer required. The NDF_ system will not perform this task itself.

• Although this routine will check the access mode value supplied against the available access to the NDF, HDS does not allow the returned locator to be protected against write access in the case where WRITE access to the NDF is available, but only READ access was requested. In this case it is the responsibility of the caller to respect the locator access restriction.

• If this routine is called with STATUS set, then an invalid locator will be returned for the LOC argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason.