SQLQuery action (<sqlquery> element)

The SQLQuery action is a very useful and powerful action that allows you to send an SQL statement to a host database, retrieve any data resulting from the SQL statement, and then write the data into a Host On-Demand macro variable.

This action can be specified using the Source tab in the VME, and using the Actions tab in the AME, see SQLQuery action.

You can use the SQLQuery action in any type of session that supports macros (3270 Display, 5250 Display, or VT Display).

The database server to which you connect can be on a different host than the host running your application session.

The SQLQuery action supports only SQL statements of type Select. It does not support SQL statements of type Insert, Update, or Delete.

The SQLQuery action requires a database driver that is accessible to both the HCL ZIETrans Toolkit environment and the specific HCL ZIETrans applications using the SQLQuery action. The database driver is specific to the database being accessed; obtain this driver from the database administrator.

For the SQL Wizard to function correctly within the HCL ZIETrans Toolkit, the database driver file should be placed in the lib\ext directory of the Java™ Runtime Environment (JRE) being used by the Rational® Software Delivery Platform (for example, RAD_INSTALL_DIR\jre\lib\ext). You must restart the Rational Software Delivery Platform (if it was active) after copying the database driver to the JRE location.

The HCL ZIETrans application must also have access to the database driver file when it is deployed. For HCL ZIETrans Web applications, the database driver file should be added to the EAR level. After the file is added to the EAR level, each WAR in the HCL ZIETrans application that uses the SQLQuery action must have its META-INF/MANIFEST.MF file updated to include the database driver file. To ensure that the update to the MANIFEST.MF file is made correctly, edit it using the JAR Dependency Editor.

For more information, see <sqlquery> element.