COBOL Manual for TNS and TNS/R Programs

Process Initiation, Communication, and
Management
HP COBOL Manual for TNS and TNS/R Programs522555-006
31-12
Process Names
Process Names
A process that expects to receive messages must have a name by which the sending
process can designate it.
All processes running on an HP system, named and unnamed, have process file
names. If a process is not named explicitly—with the RUNNAMED directive,the NAME
option of the RUN command, or the name :length parameter of the
PROCESS_CREATE_ procedure—the operating environment issues it with a process
file name to an unnamed process.
A file name for an unnamed process consists of an optional node name, a dollar sign
($), a processor and PIN, and a process sequence number.
A file name for a named process consists of an optional node name, a process name
(whose first character is a dollar sign ($)), an optional sequence number, and optional
qualifiers.
To find the names of processes currently active, use the TACL command PPD.
NonStop systems maintain the list of process names in a destination control table
(DCT). The systems recognize the PPD command as a request for a tabulation of
information about named processes, not unnamed processes.
PROCEDURE DIVISION.
...
OPEN I-O TASKS-IN.
...
READ TASKS-IN.
IF TRAN-PMT
PERFORM ...
IF SOME-ERROR
MOVE 2 TO RESULT-CODE
ELSE MOVE 1 TO RESULT-CODE
MOVE WS-NEW-BALANCE TO NEW-BALANCE
WRITE TRAN-RESPONSE
ELSE
...
Example 31-6. Report Produced by PPD Command
NAME PID1 PID2 ANCESTOR
$Z000 00,022 01,021 00,021
$CRT2 00,021 01,022 $Z000
$NULL 07,004 00,024 00,025
$CMON 07,005 00,026 00,025
$IMON 00,031 01,025 06,010
$DM00 00,032 $IMON
$DM01 01,024 $IMON
...
Example 31-5. Server Code (page 2 of 2)