Compaq AA-PWCBD-TE Computer Accessories User Manual


 
DEC Text Processing Utility Program Development
5.6 Using DECTPU Startup Files
This command causes DECTPU to write the binary form of the file MY_
APPLICATION.TPU to the file you specified as the parameter to the SAVE
statement in your program. To use the section file, invoke DECTPU, specifying
your section file.
For more information on invoking DECTPU, see Chapter 2.
5.6.5.2 Extending an Existing Section File
To extend an existing section file, begin by writing a program in the DECTPU
language.
If you are extending the EVE section file, put your initializing statements in
an initialization procedure called TPU$LOCAL_INIT. TPU$LOCAL_INIT is
an empty procedure in the EVE section file. When you add your DECTPU
statements and procedures to the EVE section file, your procedure named
TPU$LOCAL_INIT supersedes EVE’s original empty value of TPU$LOCAL_INIT.
TPU$LOCAL_INIT is called at the end of the procedure TPU$INIT_
PROCEDURE during the initialization sequence. For more information on the
initialization sequence, see Section 5.6.4.
If you are extending a non-EVE section file, you must determine whether that
section file has implemented the convention of including a TPU$LOCAL_INIT
procedure.
After adding DECTPU procedures and statements that implement your
application, end your program with the following statements:
A statement that contains the SAVE built-in procedure. SAVE is the
mechanism by which you store all currently defined procedures, variables,
and bound keys in binary form.
The QUIT built-in procedure. QUIT ends the DECTPU session.
For more information on SAVE and QUIT, see the descriptions of these built-ins
in the DEC Text Processing Utility Reference Manual.
Example 5–4 shows the syntax of a program that could be used to create a section
file.
Example 5–4 Sample Program for a Section File
PROCEDURE tpu$local_init
.
.
.
ENDPROCEDURE;
PROCEDURE vt100_keys
.
.
.
ENDPROCEDURE;
vt100_keys; !Call the procedure that defines the keys
SAVE ("vt100ini.tpusection");
QUIT;
To add your program to an existing section file, invoke DECTPU but do not
supply as a parameter the name of a file to be edited. Use the /SECTION
qualifier to specify the section file to which you want to add your program.
Use the /COMMAND qualifier to specify the file that contains your program.
5–20 DEC Text Processing Utility Program Development