next up previous contents
Next: Data _CLOSE routine Up: The Application Level Previous: A Data routine   Contents

Data _INIT routine

When a PSF is selected using one of the PSF_ASSOC routines, the routine PSF_<name>_INIT is invoked if present. This routine is supplied with the slot number and locator to the associated dataset. The former can be used to index a common block inside the library if required - the locator is available for any access the library routine might need, eg. getting a filter id.

Note that the _INIT routine should never annul the locator it is given, and should either free any resources it uses or store them in COMMON so that the PSF_<name>_CLOSE routine can do so.

The PSF system defines two ADAM parameters called MASK and AUX for the use of _INIT routines. These can be used to get auxilliary information from the user The interface file parameter type for both is "LITERAL" which means that scalar values and filesnames can be read using these parameters; vectors, however, must be parsed after reading PAR_GET0C. The prompts require defining using the PAR_PROMT subroutine. _INIT routines should always PAR_CANCL any environment parameter accessed. This permits multiple calls to an _INIT routine for different PSFs.


next up previous contents
Next: Data _CLOSE routine Up: The Application Level Previous: A Data routine   Contents
Asterix
2000-06-28