The JCL for the DB2 Query facility is similar to the JCL of a standard disk sort. The primary difference is that the DB2 query JCL must also contain an additional SORTDBIN DD specification to define the DB2 query with an SQL SELECT statement.
To initiate a SORT or COPY with the DB2 Query facility using job control statements, specify PARM='DB2=dsn' on the EXEC statement. The dsn referred to in the DB2 parameter is the DB2 subsystem name to be accessed. When a SORT or COPY DB2 Query application is invoked from a program, specify the DB2 parameter in the $ORTPARM DD statement.
Note: In order to issue the first query to the DB2 subsystem identified in the DB2=parm, you must
have BINDADD authority so the SYNCSORT packages and plan can be added to the subsystem.
If you don’t want to use the default DB2 options to bind our SYNCSORT packages and plan,
you can manually do the binding by using DBRM members which are included with your MFX
installation files. Contact Precisely Support for additional instructions.