e-docs > Tuxedo > ATMI COBOL Function Reference > Section 3(cbl) - COBOL Functions |
ATMI COBOL Function Reference |
Name
TPBROADCAST() - broadcast notification by name
Synopsis
01 TPBCTDEF-REC.
COPY TPBCTDEF.
01 TPTYPE-REC.
COPY TPTYPE.
01 DATA-REC.
COPY User data.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPBROADCAST" USING TPBCTDEF-REC TPTYPE-REC DATA-REC TPSTATUS-REC.
Description
TPBROADCAST() allows a client or server to send unsolicited messages to registered clients within the system. The target client set consists of those clients matching identifiers passed to TPBROADCAST(). Wildcards can be used in specifying identifiers.
LMID, USRNAME and CLTNAME, all in TPBCTDEF-REC, are logical identifiers used to select the target client set. A SPACES value for any logical identifiers constitutes a wildcard for that argument. A wildcard argument matches all client identifiers for that field. Each identifier must meet the size restrictions defined for the system to be considered valid, that is, each identifier must be between 0 and 30 characters in length.
The data portion of the request is identified by DATA-REC and LEN in TPTYPE-REC specifies how much of DATA-REC to send. Note that if DATA-REC is a record of a 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, in which case DATA-REC and LEN are ignored and a request is sent with no data portion.
The following is a list of valid settings in TPBCTDEF-REC.
Return Values
Upon successful completion, TPBROADCAST() sets TP-STATUS to [TPOK].
Errors
Under the following conditions, TPBROADCAST() sends no broadcast messages to application clients and sets TP-STATUS to:
Portability
The interfaces described in TPNOTIFY() are supported on native site UNIX-based processors. In addition, the routines TPBROADCAST() and TPCHKUNSOL() as well as the routine TPSETUNSOL() are supported on UNIX and MS-DOS workstation processors.
Usage
Clients that select signal-based notification may not be signal-able by the system due to signal restrictions. When this occurs, the system generates a log message that it is switching notification for the selected client to dip-in and the client is notified then and thereafter via dip-in notification. (See UBBCONFIG(5) description of the RESOURCES NOTIFY parameter for a detailed discussion of notification methods.)
Because signaling of clients is always done by the system, the behavior of notification is always consistent, regardless of where the originating notification call is made. Therefore to use signal-based notification:
The ID for the application administrator is identified in the configuration file for the application.
If signal-based notification is selected for a client, then certain ATMI calls can fail, returning TPGOTSIG() due to receipt of an unsolicited message if TPSIGRSTRT is not specified. See UBBCONFIG(5) and TPINITIALIZE(3cbl) for more information on notification method selection.
See Also
TPINITIALIZE(3cbl), TPNOTIFY(3cbl), TPTERM(3cbl), UBBCONFIG(5)