Query/38 optimization for DDM

Query/38 has an optimization function, but because it causes i5/OS™ database query to be used, the feature cannot be used when the query is performed against a remote file that is not on an iSeries™ server or a System/38™.

Because i5/OS database query does not exist on non-iSeries servers or non-System/38s, the optimization function cannot be used by the source iSeries server when performing a query against a non-iSeries or a non-System/38 remote file.

Therefore, when a Query/38 application is being created or changed that accesses a remote file on a non-iSeries server or a non-System/38, the OPTIMIZE parameter on the Create Query Application (CRTQRYAPP), Create Query Definition (CRTQRYDEF), or Change Query Definition (CHGQRYDEF) command must be changed to *NO. Specifying OPTIMIZE(*NO) forces Query/38 to read the file sequentially, which can be done with non-iSeries target files. If the default of *YES is used, an error occurs when the Query/38 application is run.

Similarly, if the Design Query Application (DSNQRYAPP) command is used to create and run queries that are to be performed on a non-iSeries target file, the Optimize Query prompt on the Application Creation display must be changed from Y to N.

Related reference
Non-iSeries or non-System/38 Query/38 example
i5/OS database query