COBOL Manual for TNS/E Programs (H06.03+)
Process Initiation, Communication, and
Management
HP COBOL Manual for TNS/E Programs—520347-003
31-9
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.
DATA DIVISION.
...
FD TASKS-IN
LABEL RECORDS ARE OMITTED
RECORD CONTAINS 1 TO 8 CHARACTERS.
01 TRAN-REQUEST.
05 TRAN-CODE PICTURE 9.
88 TRAN-PMT VALUE IS 1.
...
05 ACCOUNT-NUMBER PICTURE 9(6).
...
01 TRAN-RESPONSE.
05 RESULT-CODE PICTURE 9.
88 RESULT-OK VALUE IS 1.
88 RESULT-ERROR VALUE IS 2.
...
05 NEW-BALANCE PICTURE 9(7).
...
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-4. Server Code (page 2 of 2)










