This section describes the SQLIDMS SET SESSION CURRENT SCHEMA and SET TRANSACTION commands, and IDMS/SQL session control. |
In this section: |
The IDMS/SQL Data Adapter uses the user-specified schema name as the first qualifier for all SQL requests involving SQL tables or views. This command overrides the IDMS SQL current schema in effect and precludes the specification of unqualified table names. This prevents passing unqualified table names to IDMS.
To identify the schema, issue the SET SESSION CURRENT SCHEMA command from the FOCUS command level
SQL [SQLIDMS] SET SESSION CURRENT SCHEMA schema
where:
Note: Omit the SQLIDMS target RDBMS qualifier if you previously issued the SET SQLENGINE command for SQLIDMS. Use the SQL ? query command to display this setting.
IDMS protects data being read by one user from changes (INSERT, UPDATE, or DELETE) made by others; the isolation level setting governs the duration of the protection. That is, the isolation level determines when shared locks on rows are released, so that those rows or pages become available for updates by other users. IDMS SQL allows you to dynamically set the isolation level within the FOCUS session using the IDMS SQL SET TRANSACTION command.
Note: For equivalent commands for DB2 and DB2 for VM, see ISOLATION (DB2 and DB2 for VM).
The SET TRANSACTION CURSOR STABILITY or TRANSIENT READ command affects the duration of row or page shared locks on IDMS SQL tables for the duration of the IDMS SQL transaction. You can specify the command in your MODIFY procedure or from the FOCUS command level. The setting remains in effect for the FOCUS session or until you reset it.
To set the isolation level from the FOCUS command level, issue
SQL [SQLIDMS] SET TRANSACTION level
where:
Note: Omit the SQLIDMS target RDBMS qualifier from the command when issuing it in a MODIFY procedure or if you previously issued the SET SQLENGINE command for SQLIDMS.
An SQL session is a connection between the FOCUS application and the IDMS database. It begins when the application connects to a dictionary. You use the CONNECT command to override the IDMS SQL default (automatic) connection. The length of time an SQL session stays in effect depends on whether the connection began automatically or a CONNECT command was issued. If the CONNECT command was issued, the SQL session is in effect until a COMMIT RELEASE, ROLLBACK RELEASE, or RELEASE command is executed. All of these commands may be executed within the FOCUS IDMS/SQL session using Direct SQL Passthru. Refer to the appropriate CA-IDMS/DB Release 12 documentation for more information regarding SQL sessions.
Issue the following from the FOCUS command level or include it in a PROFILE FOCEXEC
SQL [SQLIDMS] CONNECT TO dictname
where:
Note: Omit the SQLIDMS target RDBMS qualifier if you previously issued the SET SQLENGINE command for SQLIDMS.
Other IDMS SQL commands that affect the IDMS SQL session can be executed explicitly.
To issue IDMS SQL session commands such as COMMIT, COMMIT RELEASE, ROLLBACK, ROLLBACK RELEASE, and COMMIT CONTINUE, the syntax is:
SQL [SQLIDMS] COMMIT RELEASE
Information Builders |