Opens a data pipe to receive input from the remote DBMS through Open ClientConnect.
Syntax varies with the programming language.
command uses the values in these SPAREA fields:
SPMODE (see page §) specifies that the data pipe is opened for input.
SPFORMAT (see page “SPFORMAT”) specifies that DB2 is the data pipe format.
SPSQLDA (see page “SPSQLDA”) contains the address of a SQLDA that describes the content of the data records, being returned to the CSA.
MOVE 'INPUT' TO SPMODE. MOVE 'DB2' TO SPFORMAT. CALL 'OPENPIPE' USING SPAREA. SET ADDRESS OF SQLDA TO SPSQLDA.
CSA data pipes are always opened in input mode and DB2 format.
If you transfer data between data sources with the INSERT, UPDATE, or TRANSFER command, you do not need to open a data pipe; you can simply send the Open ClientConnect TRANSFER command.
Use the OPENPIPE command only when the CSA is expecting data results; in other words, after the CSA sends a SELECT request and results are available. To determine whether results are available, the CSA must check the SPSTATUS field (see page “SPSTATUS”) for ‘R’.
Open ClientConnect provides the SQLDA address. You define the SQLDA mask in the CSA code, and then pass it the address from Open ClientConnect.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |