DSM Template Services Manual
Display-Text Procedures
DSM Template Services Manual—427187-004
2-26
SPI_FORMAT_CLOSE_
SPI_FORMAT_CLOSE_
The SPI_FORMAT_CLOSE_ procedure lets a program that has been using the
template file close the file. This is useful for applications that access the template file
through calls to the SPI_BUFFER_FORMAT procedures or the EMSTEXT procedure
and want to switch template files.
The syntax for calling SPI_FORMAT_CLOSE_ is:
Without SPI_FORMAT_CLOSE_, an application that uses the template file generally
keeps it open until the application terminates execution. Waiting for the execution to
terminate is often acceptable, but this depends on both the length of the wait and the
reason for closing the template file.
The primary reason for calling SPI_FORMAT_CLOSE_ is to enable an application to
use a new template file. First, your application must set up a logical DEFINE that gives
the name of the new nonresident template file. To do so, the application calls system
DEFINExxx procedures (such as DEFINEADD) to link the =_EMS_TEMPLATES
DEFINE with the name of the new template file. The application must then call
SPI_FORMAT_CLOSE_ because the DEFINE is ignored as long as the template file is
open. The next time the application needs template information, the system finds and
opens the new template file.
CALL SPI_FORMAT_CLOSE_