### NDF_EXIST

See if an existing NDF is associated with an ADAM parameter

#### Description:

The routine determines if an existing (and accessible) NDF is associated with an ADAM parameter. If it is, then an identifier is returned for it. If not, then the routine returns with an identifier value of NDF__NOID; this then allows the NDF structure to be created (e.g. using NDF_CREAT) if required.

#### Invocation

CALL NDF_EXIST( PARAM, MODE, INDF, STATUS )

#### Arguments

##### MODE = CHARACTER $\ast$ ( $\ast$ ) (Given)
Type of NDF access required: ’READ’, ’UPDATE’ or ’WRITE’.
NDF identifier.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Notes:

• If ’WRITE’ access is specified, then all the NDF’s components will be reset to an undefined state ready to receive new values. If ’UPDATE’ access is specified, the NDF’s components will retain their values, which may then be modified.

• The behaviour of this routine is the same as NDF_ASSOC, except that in the event of the NDF structure not existing (or being inaccessible), control is returned to the application with an identifier value of NDF__NOID, rather than re-prompting the user.

• Note that unlike the DAT_EXIST routine, on which it is modelled, this routine does not set a STATUS value if the data structure does not exist.

• If this routine is called with STATUS set, then a value of NDF__NOID will be returned for the INDF argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason. The NDF__NOID constant is defined in the include file NDF_PAR.