DB2 REXX SQL for VM/ESA(R): Installation and Reference


Appendix J. RXSQL Runtime Environment

The RXSQL MODULE is a transient module that initiates NUCXLOAD to load the DB2 RXSQL nucleus extension from the RXSQL LOADLIB module. After it loads the nucleus extension, the transient module is not invoked again, because the CMS command search order looks for the nucleus extension first.

The nucleus extension is loaded in an area obtained by CMSSTOR so any CMS abnormal end of task (abend) such as HX causes an implicit NUCXDROP of the extension. The next invocation of DB2 RXSQL locates the transient module again and reloads the nucleus extension.

The RXSQL MODULE loads the nucleus extension with the SERVICE and ENDCMD options so that DB2 RXSQL is notified when CMS ends abnormally or returns control to the user after the typed command finishes processing successfully. When CMS notifies DB2 RXSQL of these actions, DB2 RXSQL stops communications with the database, purges all prepared SQL statements, and de-allocates or releases dynamic storage.

There is also an EXECSQL MODULE whose sole purpose is to pass control to the RXSQL MODULE or nucleus extension.

DB2 RXSQL communicates with the DB2 Server for VM database manager through the DB2 Server for VM Resource Adapter interface code. The Resource Adapter does end-of-command processing to end existing communications links with the database. When this happens, the Resource Adapter implicitly commits or rolls back changes to the database depending on how the user's command ends. If a CMS abnormal end-of-task (abend) occurs, changes are rolled back. Otherwise, an implicit COMMIT is done. Changes are committed even if the command has an error return code.
Note:End-of-command processing occurs only after a command is entered from the virtual console. It does not occur when a command is issued from an EXEC, a user program, or CMS SUBSET mode.


Tailoring the RXSQL Transient Module

RXSQL ASSEMBLE is the source file for the DB2 RXSQL transient module. The source file is distributed to allow local tailoring of the module. The RXSQL ASSEMBLE source file issues the following commands:

FILEDEF RXSQL DISK RXSQL LOADLIB * (NOCHANGE
NUCXLOAD RXSQL RXSQL RXSQL (ENDCMD SERVICE
CMSCALL RXSQL

The command CMSCALL RXSQL calls the loaded code.

If you plan to use the EXECSQL interface, you must not change the CALLTYPE option on the CMSCALL statement. DB2 RXSQL will not execute correctly if you do so.

To generate a new RXSQL MODULE type the following commands:

GLOBAL MACLIB DMSSP CMSLIB
HASM RXSQL
LOAD RXSQL (RLDSAVE
OR
GENMOD RXSQL (SYSTEM AMODE=31 RMODE=ANY     for VM/ESA 


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]