![]() Porting Considerations |
![]() Virtual Machine |
![]() |
This section lists some rules to be followed when porting SQL functions.
Between Different SQL Databases
Some RDBMSs require the SQL cursor to be closed to release all outstanding locks. This is to ensure that all cursors are closed when the transaction is completed. New function logic is defined to provide an entry point to configure the SQL dynamically, or to invoke any special SQL functions. The new function’s syntax is:
SQLCFG (<Action> [,...])
where <Action> is the specific SQL functions or runtime configuration attribute.
The variable argument is dependent on <action> or <configuration attribute>.
Currently the supported action is “RESET SQL CURSORS". The actual syntax is:
SQLCFG ("RESET SQL CURSORS"[, ["*"], “ORACLE",...])
-
If there are no arguments: The current connection’s cursors are reset
-
If the argument is "*", cursors of all connections are reset.
-
If there is a specified logical database name, the specified logical database’s cursors are reset.
This operation must be performed after rollback or commit; otherwise, unexpected results can occur. Use only ANSI SQL in Full Function statements. Avoid using explicit COMMIT() commands. If they must be used, do not rely on any row currency; preferably exit the function. Do not rely on any row currency after a ROLLBACK() command; preferably exit the function. Note that SQL databases on IBM mainframes issue automatic commits in different places (especially in the CICS environment).
Between SQL and Non-SQL Databases/ File Systems
Do not use Full Function mode SQL statements. Use Transparent mode only. Do not use the SYS-SQL command. Note the different operation of SEL-RANGE and avoid using ambiguous ranges. Do not use group-occurs, redefinition, or encryption in PROIV File Definitions. Do not use COMMIT() or ROLLBACK() logic statements. Do not use views. Use only column names (not SQL expressions) in Alternate or File Variable names.
Topic ID: 720156