COBOL Manual for TNS and TNS/R Programs

Process Initiation, Communication, and
Management
HP COBOL Manual for TNS and TNS/R Programs522555-006
31-3
Initiating a Process From an HP COBOL Program
A process can modify its data but not its code; therefore, the operating environment
can fetch code pages needed from disk but does not need to restore them to disk; the
operating environment must rewrite data pages to disk when their physical memory is
surrendered.
The transfer of code and data pages between virtual memory on disk and physical
memory is directed by the memory manager process of the operating environment with
the help of the disk process.
The performance of any process is affected by the amount of time that is spent
managing memory instead of executing process instructions.
For more information about memory and its management, see the system description
manual for your processor.
Initiating a Process From an HP COBOL
Program
Suppose you want to make your running HP COBOL program start a new process.
This is different from having your HP COBOL program call another program with a
CALL or ENTER statement—you want to cause an entirely independent process to
execute asynchronously, perhaps on a different processor of the system or on a
different HP system. If your program is a TNS program, use either the
CREATEPROCESS routine (to start a low-PIN process) or the
CLU_PROCESS_CREATE_ routine (to start a high-PIN process), If your program is a
native program, use the CLU_PROCESS_CREATE_ routine.
For information on the CLU_PROCESS_CREATE_ routine, see the CRE
Programmers Guide.
You can use the CREATEPROCESS routine in various ways:
To start several other processes
To initiate a precompiled Enform query that returns records to your process from a
database
To activate the File Utility Program (FUP) and cause it to create a disk file and load
data into it
You call CREATEPROCESS with the ENTER verb and pass these items to it:
The name of the loadfile to be executed
The name to be given to the process being created (optional)
A code that specifies the process creation messages that are to be passed to the
new process (optional)
The priority at which the new process is to execute (optional)
The processor on which the new process is to execute (optional)