ATMI COBOL Function Reference
TPNOTIFY()
- send notification by client identifier
01
TPSVCDEF-REC
.
COPY TPSVCDEF.
01TPTYPE-REC
.
COPY TPTYPE.
01DATA-REC
.
COPY User data.
01TPSTATUS-REC
.
COPY TPSTATUS.
CALL "TPNOTIFY" USINGTPSVCDEF-REC
TPTYPE-REC
DATA-REC
TPSTATUS-REC
.
TPNOTIFY()
allows a server to send an unsolicited message to an individual client.
CLIENTID
in TPSVCDEF-REC
contains a client identifier saved from the TPSVCDEF-REC
of a previous or current service invocation.
DATA-REC
is the record to be sent and LEN
in TPTYPE-REC
specifies how much of DATA-REC
should be sent. If DATA-REC
is a record of type that does not require a length to be specified, then LEN
is ignored (and may be 0
). If REC-TYPE
in TPTYPE-REC
is SPACES
, DATA-REC
and LEN
are ignored and a request is sent with no data portion.
Upon successful return from TPNOTIFY()
, the message has been delivered to the system for forwarding to the identified client. If TPACK()
was set, then a successful return means the message has been received by the client. Furthermore, if the client has registered an unsolicited message handler, the handler will have been called.
The following is a list of valid settings in TPSVCDEF-REC
.
The request is not sent if a blocking condition exists (for example, the internal buffers into which the message is transferred are full). Either TPNOBLOCK
or TPBLOCK
must be set.
If a blocking condition exists in sending the notification, the caller blocks until the condition subsides or a timeout occurs (either transaction or blocking timeout). Either TPNOBLOCK
or TPBLOCK
must be set.
This setting signifies that the caller is willing to block indefinitely and wants to be immune to blocking timeouts. Transaction timeouts may still occur. Either TPNOTIME
or TPTIME
must be set.
This setting signifies that the caller will receive blocking timeouts if a blocking condition exists and the blocking time is reached. Either TPNOTIME
or TPTIME
must be set.
If a signal interrupts any underlying system calls, then the interrupted system call is reissued. Either TPNOSIGRSTRT
or TPSIGRSTRT
must be set.
If a signal interrupts any underlying system calls, then the interrupted system call is not restarted and the call fails. Either TPNOSIGRSTRT
or TPSIGRSTRT
must be set.
This setting signifies that the caller will block waiting for an acknowledgment from the client. Either TPNOACK()
or TPACK()
must be set.
Upon successful completion, TPNOTIFY()
sets TP-STATUS
to [TPOK
].
Under the following conditions, TPNOTIFY()
fails and sets TP-STATUS
to:
A blocking timeout occurred. A blocking timeout can occur under either of the following circumstances: (a)TPBLOCK
and TPTIME
are specified, or (b) TPACK
and TPTIME
are specified (in which case no acknowledgment is received).
TPBROADCAST(3cbl)
, TPCHKUNSOL(3cbl)
, TPINITIALIZE(3cbl)
, TPSETUNSOL(3cbl)
, TPTERM(3cbl)