Programs to access TSP data files should be written to make use of the TSP subroutine library (TSPSUBS) rather than making direct use of the HDS DAT_ routines. The TSPSUBS routines are described in Appendices C and D. They allow the building of new TSP structures, the reading and writing of items from the structures, and the mapping of data arrays (data arrays are always accessed by mapping in TSP programs. The only DAT_ routines that are used in TSP programs are those associated with the ADAM parameter system such as DAT_CREAT and DAT_ASSOC, and also DAT_ANNUL. Below is an example of an ADAM A-task that makes a copy of a TSP data structure using the routine TSP_COPY
Such a program could be linked with the command
on UNIX systems, and
on VAX/VMS systems.