General Page
xda,api,api set,access for windows
Details for the XDA for IBM i Access for Windows API Set
NOTE: This API set is NOT thread safeThe 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.
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
- Input Structure must be 'CDBI0200'.
- 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.
- The connect type must be 'T' for TCP/IP.
- The allow suspend field is ignored.
- The offset and length of the suspend data is ignored.
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.
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.
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.
Use this API when you wish to call an IBM i or user command.
Windows Differences
None.
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:
- The OS/400 QSQPRCED API, which provides the support for the Extended Dynamic SQL processing on the system.
- 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.
Use this API when you want to issue a stand-alone SQL command to an active database session.
Windows Differences
None.
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.
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.
Use this API to perform XA-transaction related operations for a particular connection.
Windows Differences
None.
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.
Use this API to commit the work associated with the Transaction Branch Identifier.
Windows Differences
None.
Use this API to rollback the work performed on behalf of the transaction branch.
Windows Differences
None.
Use this API to forget about a heuristically completed transaction branch.
Windows Differences
None.
Use this API to obtain a list of Transaction Branch Identifiers that are currently in a prepared or heuristically completed state.
Windows Differences
None.
Was this topic helpful?
Document Information
Modified date:
03 May 2021
UID
isg3T1027162