The following table lists the advanced options available for use with the java ifxsqlj command. Many of these options are for online checking, which is discussed in Online Checking.
Caching saves you from unnecessary connections to the database in subsequent runs of the translator for the same file.
Results are written to the file SQLChecker.cache in your current directory. The cache holds serialized representations of all SQL statements that translated without errors or warnings. The cache is cumulative and grows through successive invocations of the translator.
You empty the cache by deleting the SQLChecker.cache file.
Caching is off by default; you turn caching on by setting the -cache option to true, 1, or on; for example, -cache=true. You turn caching off by setting the option to false, 0, or off.
If unset, the translator uses javac. If you do not specify a directory path, the java ifxsqlj command searches for the executable according to the setting of your PATH environment variable.
You specify a class name or a comma-separated list of class names. For example, specify IBM Informix JDBC Driver as follows:
-driver=com.informix.jdbc.IfxDriver
The default off-line checker class is sqlj.semantics.OfflineChecker.
Off-line checking only runs when online checking does not (either because online checking was not enabled or because it stopped because of error). Off-line checking verifies SQL syntax and the usage of Java types.
With off-line checking, there is no connection to the database.
The default online checker class is sqlj.semantics.JdbcChecker.
You can specify an online checker class for a particular connection context, as in:
-online@ctxclass2=sqlj.semantics.JdbcChecker
You must specify a user name with the -user option for online checking to occur. The -password, -url, and -driver options must be appropriately set as well.
If you specify the -user option, but not the -password option, the translator prompts you for the password.
If you are using multiple connection contexts, the setting for -password for the default connection context also applies to any connection context that does not have a specific setting.
The original .ser file is not saved.
The URL can include a host name, a port number, and an Informix database name. The format is:
jdbc:informix-sqli://{<ip-address>|
<domain-name>}:<port-number>[/<dbname>]:
INFORMIXSERVER=<server-name>[;user=<username>;
password=<password>;<name>=<value>
[;<name>=<value>]...]
If you are using multiple connection contexts, the setting for -url for the default context also applies to any connection context that does not have a specific setting.
You can specify a URL for a particular
connection context, as in
-url@ctxclass2=....
Any connection context with a URL must also have a user name set for it (using the -user option) for online checking to occur.
For example, to enable online checking on the default connection context and connect with the user name fred, use the following option:
-user=fred
If you are using multiple connection contexts, the setting for -user for the default connection context also applies to any connection context that does not have a specific setting.
If you want to enable online checking for the default context, but turn off online checking for another connection—for example ctxcon2—you need to specify the -user option twice:
-user=fred -user@ctxcon2=
To enable online checking for a particular connection context, specify that context with the user name, as in:
-user@ctxcon3=joyce
The classes of the connection contexts you specify must all be declared in your source code or previously compiled into a .class file.
You must also include the path to the interpreter. If you do not specify a particular Java interpreter using this option, the translator uses java as a default.
The -vm option must be specified on the command line; you cannot set it in a property file.