IBM Support

IBM i Access for Windows - XDA


Details for the XDA for IBM i Access for Windows API Set

NOTE: This API set is NOT thread safe

The following is a brief description of each EDRS API. If there are any differences in the behavior between the API and its OS/400 counterpart, they will be explained. Please note that the QxdaBlockEDRS and QxdaCheckEDRSBlock APIs are not provided for Windows.


QxdaConnectEDRS

The first step in access a remote database is calling the QxdaConnectEDRS API. As its name implies, it will establish the database connection (session) to a specified system using TCP/IP. If the connection request is successful, a connection handle is returned. This connection handle must be used in all subsequent EDRS API calls to uniquely identify the system job that is to handle the request. Remember that the EDRS system must be active on the system. The command to do this is STRTCPSVR *EDRSQL. If the EDRS system isn't active, no connection can be made.

Windows Differences

  1. Input Structure must be 'CDBI0200'.
  2. The user profile and password must be passed to authenticate the user on the system.
    • The CCSID value should be specified to request the job CCSID under which the host IBM i is to be run.
  3. The connect type must be 'T' for TCP/IP.
  4. The allow suspend field is ignored.
  5. The offset and length of the suspend data is ignored.

QxdaCallProgramEDRS

This API allows you to call a IBM i program from an active session, passing any number of input, update, and output type parameters. In order to make use of this API, you will have to create a catcher program on the system. This catcher program can do anything it has authority to on the system. The catcher program is the one you will identify to be called in the QxdaCallProgramEDRS API. Based on the paramters passed to it, the catcher program can perform the required function directly, or call the system APIs or programs to accomplish the desired function. The input to the catcher program will be a single parameter, which is a pointer to an array of all the parameters specified on the call to QxdaCallProgramEDRS.

Windows Differences
None.


QxdaCommitEDRS

If a session has been opened under commitment control, the QxdaCommitEDRS API should be called when a series of database operations has been completed, and you want the changes permanently recorded in the database.

Windows Differences
None.


QxdaFindEDRSJob

This API allows you to find out information about IBM i jobs currently handling active sessions. You can select details for jobs that meet selected user defined characteristics.

Windows Differences
None.


QxdaCommandEDRS

Use this API when you wish to call an IBM i or user command.

Windows Differences
None.


QxdaProcessExtDynEDRS

This API allows you to have remote access to the QSQPRCED (Process Extended Dynamic SQL) API on the system. In order to use this function, you really need to understand to different APIs:

  1. The OS/400 QSQPRCED API, which provides the support for the Extended Dynamic SQL processing on the system.
  2. The QxdaProcessExtDynEDRS API itself.

The OS/400 QSQPRCED API provides 11 different function calls. Each of the calls requires that a template be filled out with the information pertinent to the particular call.

Windows Differences
Windows does not support direct mapping.


QxdaProcessImmediateEDRS

Use this API when you want to issue a stand-alone SQL command to an active database session.

Windows Differences
None.


QxdaRollbackEDRS

If a session has been opened under commitment control, the QxdaRollbackEDRS API should be called when a series of database operations has been completed, and you want to back these changes out of the database.

Windows Differences
None.


QxdaDisconnectEDRS

After completing all work for a session, the QxdaDisconnectEDRS API should be called to end the host system job, and free up any resources in use by that job.

Windows Differences
None.


QxdaSetConnection

Use this API to perform XA-transaction related operations for a particular connection.

Windows Differences
None.


QxdaXAPrepare

Use this API to prepare for commitment any work performed on behalf of the Transaction Branch Identifier. The resource manager places all resources used in the transaction branch in a state that the changes can be made permanently when it later receives the QxdaXACommit() request.

Windows Differences
None.


QxdaXACommit

Use this API to commit the work associated with the Transaction Branch Identifier.

Windows Differences
None.


QxdaXARollback

Use this API to rollback the work performed on behalf of the transaction branch.

Windows Differences
None.


QxdaXAForget

Use this API to forget about a heuristically completed transaction branch.

Windows Differences
None.


QxdaXARecover

Use this API to obtain a list of Transaction Branch Identifiers that are currently in a prepared or heuristically completed state.

Windows Differences
None.

Document information

More support for: Power Systems

Version: Version Independent

Operating system(s): IBM i

Reference #: T1027162

Modified date: 27 March 2018


Translate this page: