![]() |
![]() |
e-docs > Tuxedo > ATMI COBOL Function Reference > Section 3(cbl) - COBOL Functions |
ATMI COBOL Function Reference
|
Name
TPCONNECT() - establish a conversational connection
Synopsis
01 TPSVCDEF-REC.
COPY TPSVCDEF.
01 TPTYPE-REC.
COPY TPTYPE.
01 DATA-REC.
COPY User data.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPCONNECT" USING TPSVCDEF-REC TPTYPE-REC DATA-REC TPSTATUS-REC.
Description
TPCONNECT() allows a program to set up a half-duplex connection to a conversational service, SERVICE-NAME in TPSVCDEF-REC. The name must be one of the conversational service names posted by a conversational server.
As part of setting up a connection, the caller can pass application-defined data to the receiving service routine. If the caller chooses to pass data, then DATA-REC contains the data and LEN in TPTYPE-REC specifies how much of the record 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, DATA-REC and LEN are ignored (no application data is passed to the conversational service). REC-TYPE and SUB-TYPE in TPTYPE-REC must match one of the types and subtypes recognized by SERVICE-NAME.
Because the conversational service receives DATA-REC and LEN upon successful return from TPSVCSTART(), the service does not call TPRECV() to get the data sent by TPCONNECT().
The following is a list of valid settings in TPSVCDEF-REC.
Return Values
Upon successful completion, TPCONNECT() sets TP-STATUS to [TPOK] and returns a communications handle in COMM-HANDLE in TPSVCDEF-REC that is used to refer to the connection in subsequent calls.
Errors
Under the following conditions, TPCONNECT() fails and sets TP-STATUS to (unless otherwise noted, failure does not affect the caller's transaction, if one exists).
See Also
TPDISCON(3cbl), TPRECV(3cbl), TPSEND(3cbl)
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |