Compaq AA-PWCBD-TE Computer Accessories User Manual


 
DEC Text Processing Utility Data Types
3.8 Process Data Type
3.8 Process Data Type
The CREATE_PROCESS built-in procedure returns a value of the process data
type.
A DECTPU process runs as a subprocess.
DECTPU processes have the same restrictions that OpenVMS subprocesses have.
Following are some of the restrictions:
You cannot create more DECTPU processes than your account subprocess
quota allows.
You cannot spawn a subprocess in an account that has the CAPTIVE flag set.
Only OpenVMS utilities that can perform I/O to a mailbox and that do
simple reads and writes (for example, MAIL) can run in a DECTPU process.
Programs like FMS, PHONE, or any other program that takes full control
of the screen, do not work properly in a DECTPU process. See the built-in
procedure SPAWN for information on running these types of programs from
DECTPU.
You do not see any prompts from the utility you are using. For example, in
MAIL, you have to be aware of the sequence of prompts for sending a mail
message because you do not see the prompts.
The following example assigns a value of the process data type to the variable x:
x := CREATE_PROCESS (main_buffer, "MAIL");
The first parameter specifies that the output from the process is to be stored in
MAIN_BUFFER. The string "MAIL" is the first command sent to the subprocess.
To pass commands to a subprocess, use the SEND built-in procedure, as follows:
SEND ("MAIL", x);
To pass the READ command to the Mail utility, enter the following DECTPU
statement:
SEND ("READ", x);
The output from the READ command is stored in the buffer associated with the
process x. If the buffer associated with a process is deleted, the process is deleted
as well.
3.9 Program Data Type
A program is the compiled form of a sequence of DECTPU procedures and
executable statements. The COMPILE and LOOKUP_KEY built-in procedures
can optionally return a value of the program data type as a result. The following
example assigns a value of the program data type to the variable x:
x := COMPILE (main_buffer);
MAIN_BUFFER must contain only DECTPU declarations, executable statements,
and comments. All declarations must come before any executable statements
that are not included in the declarations. The declarations and statements are
compiled and the resulting program is stored in the variable x.
3–18 DEC Text Processing Utility Data Types