Access service library

If client applications invoke an RSP through the Access Service Library, you need to be aware of how some of the DirectConnect configuration properties affect both client application and RSP processing. This section explains the following information:


Datatype conversion

Adaptive Server Enterprise applications are designed to manipulate data in Adaptive Server Enterprise datatypes. When these applications execute an RSP to retrieve host data, DirectConnect converts the result rows into the corresponding Adaptive Server Enterprise datatypes.


Preventing inconsistencies in SQL transformation

Adaptive Server Enterprise uses the Transact-SQL™ query language, while DB2 uses IBM’s version of SQL. Consequently, SQL statements written for Adaptive Server Enterprise generally do not perform as expected when executed against DB2. To prevent SQL inconsistencies, each DirectConnect Access Service is configured either for native SQL or for Transact-SQL transformation.

NoteDirectConnect Access Service is a specific set of configuration properties working with the Access Service Library. The Access Service Library is the program component that works with MainframeConnect to provide access to DB2 data.

The corresponding DirectConnect Access Service transformation modes are PASSTHROUGH for native DB2 SQL and SYBASE for Transact-SQL.

NoteTSQL transformation modes (TSQL0, TSQL1 and TSQL2) are supported to provide backward compatibility.

If you write a client application to invoke an RSP, you must be aware of how the SQL transformation level is configured for the Access Service because it determines the format of the RSP invocation command you use. See Figure 5-3 for more information.

NoteTRS always uses PASSTHROUGH.


Managing COMMIT /ROLLBACK

When you write an RSP, be aware of how DirectConnect configuration property settings affect COMMIT/ROLLBACK management under normal and error conditions. The following table shows the interaction of the configuration property settings under normal processing conditions.

Table 2-2: Configuration properties and COMMIT/ROLLBACK

Transaction mode DirectConnect configuration property setting

Outcome

SHORT

MainframeConnect issues COMMIT/ROLLBACK after each batch

LONG

Client application or RSP issues COMMIT/ROLLBACK

Therefore, if TRS invokes an RSP, the transaction is committed (unless the transaction failed) because TRS always runs in SHORT.

The client application uses standard SQL statements to issue COMMITs and ROLLBACKs; the RSP uses the special RSP COMMIT and ROLLBACK commands.

If the RSP invokes through Access Service Library, COMMIT and ROLLBACK processing under error conditions is also affected by the DirectConnect Stop Condition configuration property.

This property can be set as follows:

NoteThe client application can override the DirectConnect StopCondition configuration property with the following set statement: set StopCondition {error|none|warning}.