SYS_MGR.ENGINE

How to:

You can issue DBMS commands directly (SQL Passthru) from a Maintain procedure using the SYS_MGR.ENGINE command.

Note: Problems with direct commands are not reported in FOCERROR. You will need to use DBMS_ERRORCODE to determine the success or failure of these commands.


Top of page

x
Syntax: How to Use the SYS_MGR.ENGINE Command

The syntax for the SYS_MGR.ENGINE command is

SYS_MGR.ENGINE("enginename", "command");

where:

enginename

Is the name of the RDBMS to which you are passing the command. For a complete list of the possible values, see the appropriate adapter manual.

command

Is any valid SQL command, including CREATE, DROP, and INSERT.



Example: Issuing the DROP TABLE Command

The following command drops the table NYACCTS. The error code is saved in a variable named rc.

Compute rc/i8;
rc = sys_mgr.engine("SQLMSS", "DROP TABLE NYACCTS");
Type "Return Code=<<rc  DBMS Err=<<SYS_MGR.DBMS_ERRORCODE" ;

Information Builders